diff options
author | Michio Honda <micchie@sfc.wide.ad.jp> | 2011-06-10 03:42:14 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2011-06-11 18:53:45 -0400 |
commit | 6d65e5eee6fc8fa9abef9e78e7e789c2cb06f95c (patch) | |
tree | 5f01ae4b2f28dd5e462fb73770edfe61de39487c /net/sctp | |
parent | 69785b79ca9b1acb62098ff059f897bfe59d443f (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.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, | |||
786 | continue; | 786 | continue; |
787 | asoc->asconf_addr_del_pending = | 787 | asoc->asconf_addr_del_pending = |
788 | kzalloc(sizeof(union sctp_addr), GFP_ATOMIC); | 788 | kzalloc(sizeof(union sctp_addr), GFP_ATOMIC); |
789 | if (asoc->asconf_addr_del_pending == NULL) { | ||
790 | retval = -ENOMEM; | ||
791 | goto out; | ||
792 | } | ||
789 | asoc->asconf_addr_del_pending->sa.sa_family = | 793 | asoc->asconf_addr_del_pending->sa.sa_family = |
790 | addrs->sa_family; | 794 | addrs->sa_family; |
791 | asoc->asconf_addr_del_pending->v4.sin_port = | 795 | asoc->asconf_addr_del_pending->v4.sin_port = |