iris: Free query on error path

CID: 1452276
This commit is contained in:
Kenneth Graunke
2019-08-11 07:46:03 -07:00
parent 661be3fef9
commit 0f3768bc5d
+3 -1
View File
@@ -462,8 +462,10 @@ iris_create_batch_query(struct pipe_context *ctx,
q->type = PIPE_QUERY_DRIVER_SPECIFIC;
q->index = -1;
q->monitor = iris_create_monitor_object(ice, num_queries, query_types);
if (unlikely(!q->monitor))
if (unlikely(!q->monitor)) {
free(q);
return NULL;
}
return (struct pipe_query *) q;
}