summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorOliver McFadden <oliver.mcfadden@nokia.com>2010-04-22 10:29:44 +0300
committerJeremy Huddleston <jeremyhu@apple.com>2010-05-02 20:05:18 -0700
commit67a50803da4eb8d7f827c32776441f34cb726365 (patch)
treee6937e77f67f1a654524e6d483710fa0e91ed609
parent2c94da4e22520f4a3e783db06b73251131382868 (diff)
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> (cherry picked from commit 048d15192af39ba5111882d18a957b6ff4e34cad)
-rw-r--r--hw/xquartz/xpr/x-list.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/hw/xquartz/xpr/x-list.c b/hw/xquartz/xpr/x-list.c
index 3596dd355..77c9309aa 100644
--- a/hw/xquartz/xpr/x-list.c
+++ b/hw/xquartz/xpr/x-list.c
@@ -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]);