]> git.baikalelectronics.ru Git - kernel.git/commit
tipc: fix memory leak in tipc_nl_compat_publ_dump
authorGustavo A. R. Silva <gustavo@embeddedor.com>
Sat, 5 Jan 2019 16:52:23 +0000 (10:52 -0600)
committerDavid S. Miller <davem@davemloft.net>
Mon, 7 Jan 2019 16:42:08 +0000 (11:42 -0500)
commitfaeb28ac35427eb3a4db483ab369f30f7b422cb4
treecc30dc603aa2816f59110627eb9c95724a9fc6a3
parent1ba3d96b0042ab2ae4a4b5444c220807a1940750
tipc: fix memory leak in tipc_nl_compat_publ_dump

There is a memory leak in case genlmsg_put fails.

Fix this by freeing *args* before return.

Addresses-Coverity-ID: 1476406 ("Resource leak")
Fixes: afa27932e847 ("tipc: fix a missing check of genlmsg_put")
Signed-off-by: Gustavo A. R. Silva <gustavo@embeddedor.com>
Acked-by: Ying Xue <ying.xue@windriver.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/tipc/netlink_compat.c