[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <1447727690-15251-1-git-send-email-hongzhou.yang@mediatek.com>
Date: Mon, 16 Nov 2015 18:34:50 -0800
From: Hongzhou Yang <hongzhou.yang@...iatek.com>
To: Linus Walleij <linus.walleij@...aro.org>,
Matthias Brugger <matthias.bgg@...il.com>
CC: Hongzhou Yang <hongzhou.yang@...iatek.com>,
Yingjoe Chen <yingjoe.chen@...iatek.com>,
Axel Lin <axel.lin@...ics.com>,
Maoguang Meng <maoguang.meng@...iatek.com>,
Colin Ian King <colin.king@...onical.com>,
<linux-gpio@...r.kernel.org>,
<linux-arm-kernel@...ts.infradead.org>,
<linux-mediatek@...ts.infradead.org>,
<linux-kernel@...r.kernel.org>, <srv_heupstream@...iatek.com>,
Sascha Hauer <kernel@...gutronix.de>, <biao.huang@...iatek.com>
Subject: [PATCH] pinctrl: mediatek: fix a memleak when do dt maps.
configs will kmemdup to dup_configs in pictrl util function.
So configs need to be freed.
Signed-off-by: Hongzhou Yang <hongzhou.yang@...iatek.com>
---
Fix a memleak issue.
drivers/pinctrl/mediatek/pinctrl-mtk-common.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/drivers/pinctrl/mediatek/pinctrl-mtk-common.c b/drivers/pinctrl/mediatek/pinctrl-mtk-common.c
index bbf0230..0000b5a 100644
--- a/drivers/pinctrl/mediatek/pinctrl-mtk-common.c
+++ b/drivers/pinctrl/mediatek/pinctrl-mtk-common.c
@@ -568,9 +568,10 @@ static int mtk_pctrl_dt_subnode_to_map(struct pinctrl_dev *pctldev,
}
}
- return 0;
+ err = 0;
fail:
+ kfree(configs);
return err;
}
--
1.7.9.5
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists