drm/i915/guc: Correctly free guc capture struct on error
On error the "new" allocation is not freed, so add the required kfree.
Fixes: 247f8071d5
("drm/i915/guc: Pre-allocate output nodes for extraction")
Signed-off-by: Daniele Ceraolo Spurio <daniele.ceraolospurio@intel.com>
Cc: Alan Previn <alan.previn.teres.alexis@intel.com>
Cc: John Harrison <john.c.harrison@intel.com>
Reviewed-by: Nirmoy Das <nirmoy.das@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20220324000439.2370440-1-daniele.ceraolospurio@intel.com
This commit is contained in:
parent
034d47b25b
commit
c0c7385063
|
@ -1040,6 +1040,7 @@ guc_capture_alloc_one_node(struct intel_guc *guc)
|
|||
if (!new->reginfo[i].regs) {
|
||||
while (i)
|
||||
kfree(new->reginfo[--i].regs);
|
||||
kfree(new);
|
||||
return NULL;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue