[Mesa-dev] [PATCH 11/13] i965: Add missing return on error path
Juha-Pekka Heikkila
juhapekka.heikkila at gmail.com
Tue May 5 04:25:27 PDT 2015
If there was memory allocation failure have to return away from
brw_new_buffer_object
Signed-off-by: Juha-Pekka Heikkila <juhapekka.heikkila at gmail.com>
---
src/mesa/drivers/dri/i965/intel_buffer_objects.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/src/mesa/drivers/dri/i965/intel_buffer_objects.c b/src/mesa/drivers/dri/i965/intel_buffer_objects.c
index 627c487..6a7d0d6 100644
--- a/src/mesa/drivers/dri/i965/intel_buffer_objects.c
+++ b/src/mesa/drivers/dri/i965/intel_buffer_objects.c
@@ -139,6 +139,7 @@ brw_new_buffer_object(struct gl_context * ctx, GLuint name)
struct intel_buffer_object *obj = CALLOC_STRUCT(intel_buffer_object);
if (!obj) {
_mesa_error_no_memory(__func__);
+ return NULL;
}
_mesa_initialize_buffer_object(ctx, &obj->Base, name);
--
1.8.5.1
More information about the mesa-dev
mailing list