diff options
Diffstat (limited to 'src/mesa/drivers')
-rw-r--r-- | src/mesa/drivers/dri/i965/brw_performance_query.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/mesa/drivers/dri/i965/brw_performance_query.c b/src/mesa/drivers/dri/i965/brw_performance_query.c index f7016e4dd15..16e467442bc 100644 --- a/src/mesa/drivers/dri/i965/brw_performance_query.c +++ b/src/mesa/drivers/dri/i965/brw_performance_query.c @@ -350,8 +350,10 @@ brw_new_perf_query_object(struct gl_context *ctx, unsigned query_index) return NULL; struct brw_perf_query_object *brw_query = calloc(1, sizeof(struct brw_perf_query_object)); - if (unlikely(!brw_query)) + if (unlikely(!brw_query)) { + gen_perf_delete_query(perf_ctx, obj); return NULL; + } brw_query->query = obj; return &brw_query->base; |