Skip to content

Commit

Permalink
[TIPC]: Fixed memory leak in tipc_link_send() when destination is unr…
Browse files Browse the repository at this point in the history
…eachable

Signed-off-by: Allan Stephens <[email protected]>
Signed-off-by: Per Liden <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
  • Loading branch information
ajstephens authored and davem330 committed Jun 26, 2006
1 parent a75bf87 commit c33d53b
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion net/tipc/link.c
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down

0 comments on commit c33d53b

Please sign in to comment.