PD#SWPL-12483
Problem:
during probe stage, some unused mems are not be freed.
Solution:
free mem after using.
Verify:
gxl_p212
Change-Id: I24a91d81f0db9fb1edbab8f63b4e8c7f940d5947
Signed-off-by: Qianggui Song <qianggui.song@amlogic.com>
for (index = 0; index < chip->custom_num; index++) {
propname = kasprintf(GFP_KERNEL, "map%d", index);
phandle = of_get_property(custom_maps, propname, NULL);
+
+ /* never use below, just use to find phandle
+ * mem leak occurs if not free
+ */
+ kfree(propname);
+ propname = NULL;
+
if (!phandle) {
dev_err(chip->dev, "%s:don't find match map%d\n",
__func__, index);