diff options
author | Michio Honda <micchie@sfc.wide.ad.jp> | 2011-06-10 09:42:14 +0200 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2011-06-12 00:53:45 +0200 |
commit | 6d65e5eee6fc8fa9abef9e78e7e789c2cb06f95c (patch) | |
tree | 5f01ae4b2f28dd5e462fb73770edfe61de39487c /net/sctp | |
parent | net: add Faraday FTGMAC100 Gigabit Ethernet driver (diff) | |
download | linux-6d65e5eee6fc8fa9abef9e78e7e789c2cb06f95c.tar.xz linux-6d65e5eee6fc8fa9abef9e78e7e789c2cb06f95c.zip |
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.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 = |