summaryrefslogtreecommitdiff
path: root/net/sctp
diff options
context:
space:
mode:
authorMichio Honda <micchie@sfc.wide.ad.jp>2011-06-10 16:42:14 +0900
committerDavid S. Miller <davem@davemloft.net>2011-06-11 15:53:45 -0700
commit6d65e5eee6fc8fa9abef9e78e7e789c2cb06f95c (patch)
tree5f01ae4b2f28dd5e462fb73770edfe61de39487c /net/sctp
parent69785b79ca9b1acb62098ff059f897bfe59d443f (diff)
sctp: kzalloc() error handling on deleting last address
Signed-off-by: Michio Honda <micchie@sfc.wide.ad.jp> Acked-by: Wei Yongjun <yjwei@cn.fujitsu.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/sctp')
-rw-r--r--net/sctp/socket.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/net/sctp/socket.c b/net/sctp/socket.c
index e7e1b142875c..60038fef3ba1 100644
--- a/net/sctp/socket.c
+++ b/net/sctp/socket.c
@@ -786,6 +786,10 @@ static int sctp_send_asconf_del_ip(struct sock *sk,
continue;
asoc->asconf_addr_del_pending =
kzalloc(sizeof(union sctp_addr), GFP_ATOMIC);
+ if (asoc->asconf_addr_del_pending == NULL) {
+ retval = -ENOMEM;
+ goto out;
+ }
asoc->asconf_addr_del_pending->sa.sa_family =
addrs->sa_family;
asoc->asconf_addr_del_pending->v4.sin_port =