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

Commit 3dc87ea9 authored by Sureshnaidu Laveti's avatar Sureshnaidu Laveti
Browse files

msm: camera: Fix for avoiding double free in EEPROM



Corrected the return value when parse and reading
EEPROM memory map failure happens, thus avoiding
the double free of the memory map information.

Change-Id: I5f109334d84deece9d0779b47036ec30a27787a7
Signed-off-by: default avatarSureshnaidu Laveti <lsuresh@codeaurora.org>
parent f86a1e68
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -307,7 +307,7 @@ int32_t cam_eeprom_parse_read_memory_map(struct device_node *of_node,
		CAM_ERR(CAM_EEPROM, "failed: eeprom power down rc %d", rc);
	return rc;
power_down:
	rc = cam_eeprom_power_down(e_ctrl);
	cam_eeprom_power_down(e_ctrl);
data_mem_free:
	kfree(e_ctrl->cal_data.mapdata);
	kfree(e_ctrl->cal_data.map);
@@ -723,7 +723,7 @@ static int32_t cam_eeprom_pkt_parse(struct cam_eeprom_ctrl_t *e_ctrl, void *arg)
	}
	return rc;
power_down:
	rc = cam_eeprom_power_down(e_ctrl);
	cam_eeprom_power_down(e_ctrl);
memdata_free:
	kfree(e_ctrl->cal_data.mapdata);
error: