mirror of
https://gitlab.freedesktop.org/xorg/xserver.git
synced 2025-12-24 10:10:05 +01:00
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
1 changed files with 1 additions and 0 deletions
|
|
@ -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…
Add table
Reference in a new issue