Message ID | Y4XUuyFi3fr354sP@kili (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | drm/i915/uc: Fix double free bug | expand |
diff --git a/drivers/gpu/drm/i915/gt/uc/intel_uc_fw.c b/drivers/gpu/drm/i915/gt/uc/intel_uc_fw.c index 0c80ba51a4bd..8aa9bcae8e72 100644 --- a/drivers/gpu/drm/i915/gt/uc/intel_uc_fw.c +++ b/drivers/gpu/drm/i915/gt/uc/intel_uc_fw.c @@ -585,6 +585,7 @@ int intel_uc_fw_fetch(struct intel_uc_fw *uc_fw) /* try to find another blob to load */ release_firmware(fw); + fw = NULL; err = -ENOENT; }
The "fw" pointer is freed again in the clean up code at the end of the function. Set it to NULL here to prevent a double free. Fixes: 016241168dc5 ("drm/i915/uc: use different ggtt pin offsets for uc loads") Signed-off-by: Dan Carpenter <error27@gmail.com> --- drivers/gpu/drm/i915/gt/uc/intel_uc_fw.c | 1 + 1 file changed, 1 insertion(+)