From 048d15192af39ba5111882d18a957b6ff4e34cad Mon Sep 17 00:00:00 2001 From: Oliver McFadden Date: Thu, 22 Apr 2010 10:29:44 +0300 Subject: [PATCH] x-list.c: null-returning function malloc() was called without checking Signed-off-by: Oliver McFadden Reviewed-by: Jeremy Huddleston --- hw/xquartz/xpr/x-list.c | 1 + 1 file changed, 1 insertion(+) 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]);