diff options
-rw-r--r-- | openbsd-compat/bindresvport.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/openbsd-compat/bindresvport.c b/openbsd-compat/bindresvport.c index c89f21403..eeb269d59 100644 --- a/openbsd-compat/bindresvport.c +++ b/openbsd-compat/bindresvport.c | |||
@@ -64,6 +64,7 @@ bindresvport_sa(int sd, struct sockaddr *sa) | |||
64 | if (sa == NULL) { | 64 | if (sa == NULL) { |
65 | memset(&myaddr, 0, sizeof(myaddr)); | 65 | memset(&myaddr, 0, sizeof(myaddr)); |
66 | sa = (struct sockaddr *)&myaddr; | 66 | sa = (struct sockaddr *)&myaddr; |
67 | salen = sizeof(myaddr); | ||
67 | 68 | ||
68 | if (getsockname(sd, sa, &salen) == -1) | 69 | if (getsockname(sd, sa, &salen) == -1) |
69 | return -1; /* errno is correctly set */ | 70 | return -1; /* errno is correctly set */ |