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:
Oliver McFadden 2010-04-22 10:29:44 +03:00 committed by Jeremy Huddleston
parent 40858960c0
commit 048d15192a

View File

@ -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]);