diff options
author | Michio Honda <micchie@sfc.wide.ad.jp> | 2011-06-10 11:42:14 +0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2011-06-12 02:53:45 +0400 |
commit | 6d65e5eee6fc8fa9abef9e78e7e789c2cb06f95c (patch) | |
tree | 5f01ae4b2f28dd5e462fb73770edfe61de39487c /net/sctp/socket.c | |
parent | 69785b79ca9b1acb62098ff059f897bfe59d443f (diff) | |
download | linux-6d65e5eee6fc8fa9abef9e78e7e789c2cb06f95c.tar.xz |
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/socket.c')
-rw-r--r-- | net/sctp/socket.c | 4 |
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 = |