mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-01-11 05:50:14 +01:00
i965: fix mem leak in error path
Fixes: 8ae6667992 ("intel/perf: move query_object into perf")
Signed-off-by: Eric Engestrom <eric.engestrom@intel.com>
Reviewed-by: Mark Janes <mark.a.janes@intel.com>
This commit is contained in:
parent
1c82fa0a92
commit
d7eb40962b
1 changed files with 3 additions and 1 deletions
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue