diff options
| author | Michael Tuexen <tuexen@FreeBSD.org> | 2012-11-03 13:22:25 +0000 |
|---|---|---|
| committer | Michael Tuexen <tuexen@FreeBSD.org> | 2012-11-03 13:22:25 +0000 |
| commit | 4ed0ebf6493d4c48a45bc3fe52a62b8371e47aef (patch) | |
| tree | cdce1ab6a9a0e144215d876c44bd993d1e97192c | |
| parent | 2923ae8a85dd7c72db2c34b545ff637694587723 (diff) | |
Notes
| -rw-r--r-- | lib/libc/net/sctp_sys_calls.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/libc/net/sctp_sys_calls.c b/lib/libc/net/sctp_sys_calls.c index 3785a048195a..1e06f449fabe 100644 --- a/lib/libc/net/sctp_sys_calls.c +++ b/lib/libc/net/sctp_sys_calls.c @@ -449,6 +449,7 @@ sctp_getpaddrs(int sd, sctp_assoc_t id, struct sockaddr **raddrs) opt_len = (socklen_t) ((size_t)asoc + sizeof(struct sctp_getaddresses)); addrs = calloc(1, (size_t)opt_len); if (addrs == NULL) { + errno = ENOMEM; return (-1); } addrs->sget_assoc_id = id; @@ -777,6 +778,7 @@ sctp_sendx(int sd, const void *msg, size_t msg_len, } buf = malloc(len); if (buf == NULL) { + errno = ENOMEM; return (-1); } aa = (int *)buf; @@ -1052,7 +1054,7 @@ sctp_sendv(int sd, CMSG_SPACE(sizeof(struct sctp_authinfo)) + (size_t)addrcnt * CMSG_SPACE(sizeof(struct in6_addr))); if (cmsgbuf == NULL) { - errno = ENOBUFS; + errno = ENOMEM; return (-1); } msg.msg_control = cmsgbuf; |
