s3: Remove talloc_autofree_context() from swat
authorVolker Lendecke <vl@samba.org>
Sat, 25 Sep 2010 23:30:06 +0000 (16:30 -0700)
committerVolker Lendecke <vl@samba.org>
Sun, 26 Sep 2010 01:29:29 +0000 (03:29 +0200)
In both cases, pass is freed immediately

source3/web/cgi.c

index 794152cd99ac2d3f050d32992d1c2044cdb71558..1a472a77c7060aa0af90b970bd7d71e2c5d6de6f 100644 (file)
@@ -314,7 +314,7 @@ static void cgi_web_auth(void)
                exit(0);
        }
 
-       pwd = getpwnam_alloc(talloc_autofree_context(), user);
+       pwd = getpwnam_alloc(talloc_tos(), user);
        if (!pwd) {
                printf("%sCannot find user %s<br>%s\n", head, user, tail);
                exit(0);
@@ -369,7 +369,7 @@ static bool cgi_handle_authorization(char *line)
         * Try and get the user from the UNIX password file.
         */
 
-       pass = getpwnam_alloc(talloc_autofree_context(), user);
+       pass = getpwnam_alloc(talloc_tos(), user);
 
        rhost = client_name(1);
        if (strequal(rhost,"UNKNOWN"))