Cong Wang 8de7fb3dfb tipc: fix a memory leak in tipc_nl_node_get_link()
[ Upstream commit 59b36613e85fb16ebf9feaf914570879cd5c2a21 ]

When tipc_node_find_by_name() fails, the nlmsg is not
freed.

While on it, switch to a goto label to properly
free it.

Fixes: be9c086715c ("tipc: narrow down exposure of struct tipc_node")
Reported-by: Dmitry Vyukov <dvyukov@google.com>
Cc: Jon Maloy <jon.maloy@ericsson.com>
Cc: Ying Xue <ying.xue@windriver.com>
Signed-off-by: Cong Wang <xiyou.wangcong@gmail.com>
Acked-by: Ying Xue <ying.xue@windriver.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-01-31 14:03:46 +01:00
..
2017-11-01 12:19:03 +09:00
2017-12-17 15:07:59 +01:00
2018-01-02 20:31:06 +01:00
2017-08-29 15:16:52 -07:00
2017-11-08 14:32:18 +09:00
2017-08-16 11:27:52 -07:00