summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--net/tipc/socket.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/net/tipc/socket.c b/net/tipc/socket.c
index ede78b144dcf..8c5600cfcc3e 100644
--- a/net/tipc/socket.c
+++ b/net/tipc/socket.c
@@ -784,8 +784,9 @@ new_mtu:
break;
rc = tipc_wait_for_sndmsg(sock, &timeo);
+ if (rc)
+ kfree_skb_list(buf);
} while (!rc);
-
exit:
if (iocb)
release_sock(sk);
@@ -898,6 +899,8 @@ next:
break;
}
rc = tipc_wait_for_sndpkt(sock, &timeo);
+ if (rc)
+ kfree_skb_list(buf);
} while (!rc);
exit:
if (iocb)