mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
Initialize helper structure to 0s
We check the pointers that are part of this structure for NULL before accessing them - but that means we need to zero out the structure for this to work. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
parent
dad93c425e
commit
a72597189d
1 changed files with 1 additions and 1 deletions
2
uemis.c
2
uemis.c
|
@ -129,7 +129,7 @@ static struct uemis_helper *uemis_get_helper(int diveid)
|
|||
php = &hp->next;
|
||||
break;
|
||||
}
|
||||
hp = *php = malloc(sizeof(struct uemis_helper));
|
||||
hp = *php = calloc(1, sizeof(struct uemis_helper));
|
||||
hp->diveid = diveid;
|
||||
hp->next = NULL;
|
||||
return hp;
|
||||
|
|
Loading…
Add table
Reference in a new issue