Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 70ea28cf authored by Shaohua Deng's avatar Shaohua Deng Committed by Ning Feng
Browse files

[ALPS05455880] DISP: fix frame config sec issue



if frame config params are not right, should not kfree dirty_roi_addr
just kfree the cfg directly and return

MTK-Commit-Id: 81e978ba7e9727a7784035c8c07ac116d7ae763e

Change-Id: I056161fde3f5e1869606d7037284b4e46359d8e7
Signed-off-by: default avatarShaohua Deng <shaohua.deng@mediatek.com>
CR-Id: ALPS05455880
Feature: [Module]Display Driver
parent cc79a781
Loading
Loading
Loading
Loading
+5 −6
Original line number Diff line number Diff line
@@ -1010,6 +1010,11 @@ long _frame_config(unsigned long arg)
		return -EFAULT;
	}

	if (disp_validate_ioctl_params(frame_cfg)) {
		kfree(frame_cfg);
		return -EINVAL;
	}

	DISPDBG("%s\n", __func__);
	frame_cfg->setter = SESSION_USER_HWC;

@@ -1020,12 +1025,6 @@ long _frame_config(unsigned long arg)
	if (frame_cfg->output_en)
		output_config_preprocess(frame_cfg);

	if (disp_validate_ioctl_params(frame_cfg)) {
		disp_input_free_dirty_roi(frame_cfg);
		kfree(frame_cfg);
		return -EINVAL;
	}

	if (DISP_SESSION_TYPE(frame_cfg->session_id) == DISP_SESSION_PRIMARY)
		primary_display_frame_cfg(frame_cfg);
#if ((defined CONFIG_MTK_HDMI_SUPPORT) || \