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:02:20 -0700
commit523a036bfc8d801b2827633baa92fb588500a6e4 (patch)
treeea05634e371f1f85111fc553acd56b2c764773a0
parentadcff144cfd21a6381e7ff970711e6524fc4479e (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]);