diff --git a/drivers/gpu/drm/i915/gt/uc/intel_guc_capture.c b/drivers/gpu/drm/i915/gt/uc/intel_guc_capture.c index afdcbe63e9eb..c4e25966d3e9 100644 --- a/drivers/gpu/drm/i915/gt/uc/intel_guc_capture.c +++ b/drivers/gpu/drm/i915/gt/uc/intel_guc_capture.c @@ -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; } }