From 867478b6f6fe3ad76c3d1d75b2b907f59b9a649c Mon Sep 17 00:00:00 2001 From: Alan Hourihane Date: Wed, 16 Jun 2010 18:10:34 +0100 Subject: [PATCH] util: add alloc check --- src/gallium/auxiliary/util/u_upload_mgr.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/gallium/auxiliary/util/u_upload_mgr.c b/src/gallium/auxiliary/util/u_upload_mgr.c index 75d44432d9e..af229e61a00 100644 --- a/src/gallium/auxiliary/util/u_upload_mgr.c +++ b/src/gallium/auxiliary/util/u_upload_mgr.c @@ -59,6 +59,8 @@ struct u_upload_mgr *u_upload_create( struct pipe_context *pipe, unsigned usage ) { struct u_upload_mgr *upload = CALLOC_STRUCT( u_upload_mgr ); + if (!upload) + return NULL; upload->pipe = pipe; upload->default_size = default_size; -- 2.30.2