Skip to content

Commit

Permalink
sctp: kzalloc() error handling on deleting last address
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Michio Honda authored and David S. Miller committed Jun 11, 2011
1 parent 69785b7 commit 6d65e5e
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions net/sctp/socket.c
Original file line number Diff line number Diff line change
Expand Up @@ -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 =
Expand Down

0 comments on commit 6d65e5e

Please sign in to comment.