summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--source3/web/cgi.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/source3/web/cgi.c b/source3/web/cgi.c
index a8cb543dfb..e785ce92d8 100644
--- a/source3/web/cgi.c
+++ b/source3/web/cgi.c
@@ -312,7 +312,7 @@ static void cgi_web_auth(void)
exit(0);
}
- pwd = getpwnam(user);
+ pwd = getpwnam_alloc(user);
if (!pwd) {
printf("%sCannot find user %s<br>%s\n", head, user, tail);
exit(0);
@@ -325,6 +325,7 @@ static void cgi_web_auth(void)
head, user, (int)geteuid(), (int)getuid(), tail);
exit(0);
}
+ passwd_free(&pwd);
}
/***************************************************************************