]> Git Repo - u-boot.git/commit
pinctrl: imx: fix memory leak
authorPeng Fan <[email protected]>
Thu, 11 May 2017 09:34:14 +0000 (17:34 +0800)
committerStefano Babic <[email protected]>
Thu, 18 May 2017 09:24:34 +0000 (11:24 +0200)
commitc1d1e9d677901e59f31e9c384c70883642867bc1
tree0ea2cde02d112c55d296238db7b0aaea7f0b5980
parent8ae5bb37fcb1608fad6c2d114ea449ee7adf3f35
pinctrl: imx: fix memory leak

Each time set_state is called, a new piece memory will
be allocated for pin_data, but not freed, this will
incur memory leak.

When error, the devm API could not free memory automatically.
So need call devm_kfree when error.

Issue reported by Coverity

Signed-off-by: Peng Fan <[email protected]>
Cc: Simon Glass <[email protected]>
Cc: Stefan Agner <[email protected]>
Cc: Stefano Babic <[email protected]>
drivers/pinctrl/nxp/pinctrl-imx.c
This page took 0.03508 seconds and 4 git commands to generate.