draw: add alloc check
authorAlan Hourihane <alanh@vmware.com>
Wed, 16 Jun 2010 16:55:00 +0000 (17:55 +0100)
committerAlan Hourihane <alanh@vmware.com>
Wed, 16 Jun 2010 17:02:21 +0000 (18:02 +0100)
src/gallium/auxiliary/draw/draw_llvm.c

index bd5d8853cf8a584febe86cbefc1026a509f3e46c..9117c1303dc8e5fcf04d5b6b35706cd267735cc9 100644 (file)
@@ -173,6 +173,8 @@ draw_llvm_create(struct draw_context *draw)
 #endif
 
    llvm = CALLOC_STRUCT( draw_llvm );
+   if (!llvm)
+      return NULL;
 
    llvm->draw = draw;
    llvm->engine = draw->engine;