Mesa (master): mesa/main: Add missing null check in _mesa_CreatePerfQueryINTEL()

Tapani Pälli tpalli at kemper.freedesktop.org
Fri May 30 04:24:01 UTC 2014


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

Author: Juha-Pekka Heikkila <juhapekka.heikkila at gmail.com>
Date:   Mon May 12 11:01:48 2014 +0300

mesa/main: Add missing null check in _mesa_CreatePerfQueryINTEL()

Signed-off-by: Juha-Pekka Heikkila <juhapekka.heikkila at gmail.com>
Reviewed-by: Petri Latvala <petri.latvala at intel.com>

---

 src/mesa/main/performance_monitor.c |    5 +++++
 1 file changed, 5 insertions(+)

diff --git a/src/mesa/main/performance_monitor.c b/src/mesa/main/performance_monitor.c
index 21b9423..9d1a6b4 100644
--- a/src/mesa/main/performance_monitor.c
+++ b/src/mesa/main/performance_monitor.c
@@ -1036,6 +1036,11 @@ _mesa_CreatePerfQueryINTEL(GLuint queryId, GLuint *queryHandle)
    }
 
    m = new_performance_monitor(ctx, first);
+   if (m == NULL) {
+      _mesa_error_no_memory(__func__);
+      return;
+   }
+
    _mesa_HashInsert(ctx->PerfMonitor.Monitors, first, m);
    *queryHandle = first;
 




More information about the mesa-commit mailing list