x-list.c: null-returning function malloc() was called without checking
Signed-off-by: Oliver McFadden <oliver.mcfadden@nokia.com> Reviewed-by: Jeremy Huddleston <jeremyhu@apple.com>
This commit is contained in:
parent
40858960c0
commit
048d15192a
|
@ -97,6 +97,7 @@ X_PFX (list_prepend) (x_list *lst, void *data)
|
|||
int i;
|
||||
|
||||
b = malloc (sizeof (x_list_block));
|
||||
assert(b != NULL);
|
||||
|
||||
for (i = 0; i < NODES_PER_BLOCK - 1; i++)
|
||||
b->l[i].next = &(b->l[i+1]);
|
||||
|
|
Loading…
Reference in New Issue
Block a user