mesa: remove outdated comment
[mesa.git] / src / mesa / main / queryobj.c
index b74898ceedd79d29ad40f8269f68dd60b9e32d1a..a1801336968dd29253236f7c377586672b5c8b3a 100644 (file)
@@ -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;
@@ -126,6 +126,7 @@ _mesa_check_query(struct gl_context *ctx, struct gl_query_object *q)
 static void
 _mesa_delete_query(struct gl_context *ctx, struct gl_query_object *q)
 {
+   free(q->Label);
    free(q);
 }
 
@@ -485,6 +486,7 @@ _mesa_QueryCounter(GLuint id, GLenum target)
    q->Target = target;
    q->Result = 0;
    q->Ready = GL_FALSE;
+   q->EverBound = GL_TRUE;
 
    if (ctx->Driver.QueryCounter) {
       ctx->Driver.QueryCounter(ctx, q);