]> git.proxmox.com Git - mirror_ubuntu-bionic-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)
committerMarcelo Henrique Cerri <marcelo.cerri@canonical.com>
Fri, 17 Jan 2020 17:21:39 +0000 (14:21 -0300)
commit37a0a0045860eb5077ebacf0b39e7a0111b09281
treead744dc168622267184e270b1450c44f76fd1a97
parent4477481f9f09bc839c13c62208f4cd379ed46b07
tipc: fix memory leak in tipc_nl_compat_publ_dump

BugLink: https://bugs.launchpad.net/bugs/1855787
[ Upstream commit f87d8ad9233f115db92c6c087d58403b0009ed36 ]

There is a memory leak in case genlmsg_put fails.

Fix this by freeing *args* before return.

Addresses-Coverity-ID: 1476406 ("Resource leak")
Fixes: 46273cf7e009 ("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>
Signed-off-by: Sasha Levin <sashal@kernel.org>
Signed-off-by: Kamal Mostafa <kamal@canonical.com>
Signed-off-by: Kleber Sacilotto de Souza <kleber.souza@canonical.com>
net/tipc/netlink_compat.c