tipc: fix a memleak when sending data
authorErik Hugne <erik.hugne@ericsson.com>
Mon, 7 Jul 2014 00:38:50 +0000 (20:38 -0400)
committerDavid S. Miller <davem@davemloft.net>
Tue, 8 Jul 2014 23:10:01 +0000 (16:10 -0700)
commit70452dcb6d401349fbd6db55dfab112fb44639be
treefeca55d75afa146edabe504c04f1c0dea921e69f
parent51ba0ed17514f9f7cf63a4be21092e8f2d8c558e
tipc: fix a memleak when sending data

This fixes a regression bug caused by:
067608e9d019d6477fd45dd948e81af0e5bf599f ("tipc: introduce direct
iovec to buffer chain fragmentation function")

If data is sent on a nonblocking socket and the destination link
is congested, the buffer chain is leaked. We fix this by freeing
the chain in this case.

Signed-off-by: Erik Hugne <erik.hugne@ericsson.com>
Signed-off-by: Jon Maloy <jon.maloy@ericsson.com>
Acked-by: Ying Xue <ying.xue@windriver.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/tipc/socket.c