Skip to content
Commit 7674cd0b authored by Xia Fukun's avatar Xia Fukun Committed by Jani Nikula
Browse files

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: a87d0a84 ("drm/i915/bios: Generate LFP data table pointers if the VBT lacks them")
Signed-off-by: default avatarXia Fukun <xiafukun@huawei.com>
Signed-off-by: default avatarJani Nikula <jani.nikula@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20221125063428.69486-1-xiafukun@huawei.com
parent af2c3b55
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment