summaryrefslogtreecommitdiff
path: root/drivers/gpu/drm/i915/i915_drv.h
diff options
context:
space:
mode:
authorXia Fukun <xiafukun@huawei.com>2022-11-25 14:34:28 +0800
committerJani Nikula <jani.nikula@intel.com>2022-11-29 11:39:11 +0200
commit7674cd0b7d28b952151c3df26bbfa7e07eb2b4ec (patch)
tree7118283ac3886092f4fc569e0ba9d4e20f56303d /drivers/gpu/drm/i915/i915_drv.h
parentaf2c3b557e2e66b91ea76f39d110b6023574ded4 (diff)
drm/i915/bios: fix a memory leak in generate_lfp_data_ptrs
When (size != 0 || ptrs->lvds_ entries != 3), the program tries to free() the ptrs. However, the ptrs is not created by calling kzmalloc(), but is obtained by pointer offset operation. This may lead to memory leaks or undefined behavior. Fix this by replacing the arguments of kfree() with ptrs_block. Fixes: a87d0a847607 ("drm/i915/bios: Generate LFP data table pointers if the VBT lacks them") Signed-off-by: Xia Fukun <xiafukun@huawei.com> Signed-off-by: Jani Nikula <jani.nikula@intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/20221125063428.69486-1-xiafukun@huawei.com
Diffstat (limited to 'drivers/gpu/drm/i915/i915_drv.h')
0 files changed, 0 insertions, 0 deletions