Skip to content
Commit 2fe97a57 authored by Tung Nguyen's avatar Tung Nguyen Committed by David S. Miller
Browse files

tipc: fix potential memory leak in __tipc_sendmsg()



When initiating a connection message to a server side, the connection
message is cloned and added to the socket write queue. However, if the
cloning is failed, only the socket write queue is purged. It causes
memory leak because the original connection message is not freed.

This commit fixes it by purging the list of connection message when
it cannot be cloned.

Fixes: 67879274 ("tipc: buffer overflow handling in listener socket")
Reported-by: default avatarHoang Le <hoang.h.le@dektech.com.au>
Signed-off-by: default avatarTung Nguyen <tung.q.nguyen@dektech.com.au>
Acked-by: default avatarYing Xue <ying.xue@windriver.com>
Acked-by: default avatarJon Maloy <jon.maloy@ericsson.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 61183b05
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment