From: Kenneth Graunke Date: Sun, 11 Aug 2019 14:46:03 +0000 (-0700) Subject: iris: Free query on error path X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=0f3768bc5d3a0543a18f549daee5d93eaf2c33ac;p=mesa.git iris: Free query on error path CID: 1452276 --- diff --git a/src/gallium/drivers/iris/iris_query.c b/src/gallium/drivers/iris/iris_query.c index c5ebf6b59bd..139d9521a66 100644 --- a/src/gallium/drivers/iris/iris_query.c +++ b/src/gallium/drivers/iris/iris_query.c @@ -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; }