From 4081c29d3bb5c21daa70dd498aa709e335bcd524 Mon Sep 17 00:00:00 2001 From: Andreas Schneider Date: Fri, 28 Feb 2014 17:15:40 +0100 Subject: [PATCH] s3-auth: Do not leak tmp_ctx if make_server_info() fails. Signed-off-by: Andreas Schneider Reviewed-by: Guenther Deschner --- source3/auth/server_info_sam.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/source3/auth/server_info_sam.c b/source3/auth/server_info_sam.c index 47087b1b4fd..6cd791e0090 100644 --- a/source3/auth/server_info_sam.c +++ b/source3/auth/server_info_sam.c @@ -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);