diff options
| author | Randall Stewart <rrs@FreeBSD.org> | 2010-10-26 19:01:56 +0000 |
|---|---|---|
| committer | Randall Stewart <rrs@FreeBSD.org> | 2010-10-26 19:01:56 +0000 |
| commit | 70c784401f8b4518dd929a725b7943e9ac3d107a (patch) | |
| tree | 20a54520d58ff3297322b8ba25e5757a923d3988 /lib | |
| parent | d9ebb1ad1b88bf7dc7b1fc5c3591207b25a8d31f (diff) | |
Notes
Diffstat (limited to 'lib')
| -rw-r--r-- | lib/libc/net/sctp_sys_calls.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/lib/libc/net/sctp_sys_calls.c b/lib/libc/net/sctp_sys_calls.c index 1a20146563fe..fcf4886e493e 100644 --- a/lib/libc/net/sctp_sys_calls.c +++ b/lib/libc/net/sctp_sys_calls.c @@ -724,6 +724,7 @@ sctp_sendx(int sd, const void *msg, size_t msg_len, struct sctp_sndrcvinfo *sinfo, int flags) { + struct sctp_sndrcvinfo __sinfo; ssize_t ret; int i, cnt, *aa, saved_errno; char *buf; @@ -790,6 +791,10 @@ sctp_sendx(int sd, const void *msg, size_t msg_len, return (ret); } continue_send: + if (sinfo == NULL) { + sinfo = &__sinfo; + memset(&__sinfo, 0, sizeof(__sinfo)); + } sinfo->sinfo_assoc_id = sctp_getassocid(sd, addrs); if (sinfo->sinfo_assoc_id == 0) { printf("Huh, can't get associd? TSNH!\n"); |
