From: Allan Stephens Date: Mon, 26 Jun 2006 06:50:30 +0000 (-0700) Subject: [TIPC]: Fixed memory leak in tipc_link_send() when destination is unreachable X-Git-Tag: firefly_0821_release~34991^2~16 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=c33d53b23589d9133af85effefbaa619853eb7f0;p=firefly-linux-kernel-4.4.55.git [TIPC]: Fixed memory leak in tipc_link_send() when destination is unreachable Signed-off-by: Allan Stephens Signed-off-by: Per Liden Signed-off-by: David S. Miller --- diff --git a/net/tipc/link.c b/net/tipc/link.c index ba7d3f19be12..ff40c9195fef 100644 --- a/net/tipc/link.c +++ b/net/tipc/link.c @@ -1135,9 +1135,13 @@ int tipc_link_send(struct sk_buff *buf, u32 dest, u32 selector) if (n_ptr) { tipc_node_lock(n_ptr); l_ptr = n_ptr->active_links[selector & 1]; - dbg("tipc_link_send: found link %x for dest %x\n", l_ptr, dest); if (l_ptr) { + dbg("tipc_link_send: found link %x for dest %x\n", l_ptr, dest); res = tipc_link_send_buf(l_ptr, buf); + } else { + dbg("Attempt to send msg to unreachable node:\n"); + msg_dbg(buf_msg(buf),">>>"); + buf_discard(buf); } tipc_node_unlock(n_ptr); } else {