Commit 6d65e5eee6fc8fa9abef9e78e7e789c2cb06f95c
Committed by
David S. Miller
1 parent
69785b79ca
Exists in
master
and in
6 other branches
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>
Showing 1 changed file with 4 additions and 0 deletions Side-by-side Diff
net/sctp/socket.c
... | ... | @@ -786,6 +786,10 @@ |
786 | 786 | continue; |
787 | 787 | asoc->asconf_addr_del_pending = |
788 | 788 | kzalloc(sizeof(union sctp_addr), GFP_ATOMIC); |
789 | + if (asoc->asconf_addr_del_pending == NULL) { | |
790 | + retval = -ENOMEM; | |
791 | + goto out; | |
792 | + } | |
789 | 793 | asoc->asconf_addr_del_pending->sa.sa_family = |
790 | 794 | addrs->sa_family; |
791 | 795 | asoc->asconf_addr_del_pending->v4.sin_port = |