Mesa (master): draw: add alloc check

Alan Hourihane alanh at kemper.freedesktop.org
Wed Jun 16 10:02:26 PDT 2010


Module: Mesa
Branch: master
Commit: 51729b5119df450f2f80c4e648b99fa35b9ec32d
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=51729b5119df450f2f80c4e648b99fa35b9ec32d

Author: Alan Hourihane <alanh at vmware.com>
Date:   Wed Jun 16 17:55:00 2010 +0100

draw: add alloc check

---

 src/gallium/auxiliary/draw/draw_llvm.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/src/gallium/auxiliary/draw/draw_llvm.c b/src/gallium/auxiliary/draw/draw_llvm.c
index bd5d885..9117c13 100644
--- a/src/gallium/auxiliary/draw/draw_llvm.c
+++ b/src/gallium/auxiliary/draw/draw_llvm.c
@@ -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;



More information about the mesa-commit mailing list