]> asedeno.scripts.mit.edu Git - linux.git/commit
soc: fsl: dpio: fix memory leak of a struct qbman on error exit path
authorColin Ian King <colin.king@canonical.com>
Tue, 19 Feb 2019 14:05:17 +0000 (14:05 +0000)
committerLi Yang <leoyang.li@nxp.com>
Tue, 19 Feb 2019 20:59:39 +0000 (14:59 -0600)
commitbd3bd3b36df725645036748e58a8c35c8d2cbf91
tree749eebc1a9bfff6bf26d04a311157cdae139bd98
parentc1959066ac02bd123201352ff5a8c506469a1645
soc: fsl: dpio: fix memory leak of a struct qbman on error exit path

Currently the error check for a null reg leaks a struct qbman
that was allocated earlier. Fix this by kfree'ing p on the error exit
path.

Signed-off-by: Colin Ian King <colin.king@canonical.com>
Signed-off-by: Li Yang <leoyang.li@nxp.com>
drivers/soc/fsl/dpio/qbman-portal.c