diff options
author | simon <simon@FreeBSD.org> | 2007-10-27 12:24:47 +0000 |
---|---|---|
committer | simon <simon@FreeBSD.org> | 2007-10-27 12:24:47 +0000 |
commit | f96314870d270524e2168acf6a11fad873163c42 (patch) | |
tree | 7fc0cb08100303adf9773e5d7208e8381b839bbc | |
parent | 744e5dbc9764b724274c5c8fc99fa5a56574e3f5 (diff) | |
download | FreeBSD-src-f96314870d270524e2168acf6a11fad873163c42.zip FreeBSD-src-f96314870d270524e2168acf6a11fad873163c42.tar.gz |
Use the correct variable to check for a malloc failing. This fixes a
case where mountd would fail to start with "out of memory" logged to
syslog.
-rw-r--r-- | usr.sbin/mountd/mountd.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/usr.sbin/mountd/mountd.c b/usr.sbin/mountd/mountd.c index 01b3329..11057c3 100644 --- a/usr.sbin/mountd/mountd.c +++ b/usr.sbin/mountd/mountd.c @@ -594,7 +594,7 @@ create_service(struct netconfig *nconf) break; case AF_INET6: sin6 = malloc(sizeof(struct sockaddr_in6)); - if (res->ai_addr == NULL) + if (sin6 == NULL) out_of_mem(); sin6->sin6_family = AF_INET6; sin6->sin6_port = htons(0); |