s3-auth: Do not leak tmp_ctx if make_server_info() fails.
authorAndreas Schneider <asn@samba.org>
Fri, 28 Feb 2014 16:15:40 +0000 (17:15 +0100)
committerGünther Deschner <gd@samba.org>
Thu, 13 Mar 2014 14:08:26 +0000 (15:08 +0100)
Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Guenther Deschner <gd@samba.org>
source3/auth/server_info_sam.c

index 47087b1b4fd6b5ab9d91b68a84bea7bdf218c9bb..6cd791e009088d72b5969c68dab213e2bb3cae4a 100644 (file)
@@ -75,7 +75,8 @@ NTSTATUS make_server_info_sam(TALLOC_CTX *mem_ctx,
 
        server_info = make_server_info(tmp_ctx);
        if (server_info == NULL) {
-               return NT_STATUS_NO_MEMORY;
+               status = NT_STATUS_NO_MEMORY;
+               goto out;
        }
 
        pwd = Get_Pwnam_alloc(tmp_ctx, username);