Mesa (master): mesa: Ensure gl_query_object is fully initialized.

Vinson Lee vlee at kemper.freedesktop.org
Fri Sep 6 21:52:00 UTC 2013


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

Author: Vinson Lee <vlee at freedesktop.org>
Date:   Fri Sep  6 12:27:11 2013 -0700

mesa: Ensure gl_query_object is fully initialized.

278372b47e4db8a022d57f60302eec74819e9341 added the uninitialized pointer
field gl_query_object:Label. A free of this pointer resulted in a crash.

This patch fixes piglit regressions with swrast introduced by
6d8dd59cf53d2f47b817d79204a52bb3a46e8c77.

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=69047
Signed-off-by: Vinson Lee <vlee at freedesktop.org>
Reviewed-by: Brian Paul <brianp at vmware.com>

---

 src/mesa/main/queryobj.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/src/mesa/main/queryobj.c b/src/mesa/main/queryobj.c
index 6b636f4..a180133 100644
--- a/src/mesa/main/queryobj.c
+++ b/src/mesa/main/queryobj.c
@@ -43,7 +43,7 @@
 static struct gl_query_object *
 _mesa_new_query_object(struct gl_context *ctx, GLuint id)
 {
-   struct gl_query_object *q = MALLOC_STRUCT(gl_query_object);
+   struct gl_query_object *q = CALLOC_STRUCT(gl_query_object);
    (void) ctx;
    if (q) {
       q->Id = id;




More information about the mesa-commit mailing list