From 89ca9145fb990d01535f7bd468a80cd29bfc50d7 Mon Sep 17 00:00:00 2001 From: "Simon L. B. Nielsen" Date: Sat, 27 Oct 2007 12:24:47 +0000 Subject: [PATCH] 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. --- usr.sbin/mountd/mountd.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/usr.sbin/mountd/mountd.c b/usr.sbin/mountd/mountd.c index 01b33295220..11057c39b8e 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);