Cong Wang 59b36613e8 tipc: fix a memory leak in tipc_nl_node_get_link()
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>
2018-01-15 13:45:50 -05:00
..
2015-05-14 12:24:45 -04:00
2017-10-13 08:46:00 -07:00
2015-03-05 22:08:42 -05:00
2016-07-26 14:26:42 -07:00
2017-10-26 09:38:34 +09:00
2016-08-18 23:36:07 -07:00
2017-08-23 22:31:38 -07:00
2017-10-13 08:46:00 -07:00