[PATCH] x-list.c: null-returning function malloc() was called without checking
Julien Cristau
jcristau at debian.org
Thu Apr 22 04:01:32 PDT 2010
On Thu, Apr 22, 2010 at 10:29:44 +0300, Oliver McFadden wrote:
> Signed-off-by: Oliver McFadden <oliver.mcfadden at nokia.com>
> ---
> hw/xquartz/xpr/x-list.c | 1 +
> 1 files changed, 1 insertions(+), 0 deletions(-)
>
> diff --git a/hw/xquartz/xpr/x-list.c b/hw/xquartz/xpr/x-list.c
> index 3596dd3..77c9309 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]);
assert() is not error handling...
Cheers,
Julien
More information about the xorg-devel
mailing list