From 3b92cbdfa9057a89d404d808b5253bcc83c4f60d Mon Sep 17 00:00:00 2001 From: Volker Lendecke Date: Wed, 5 Feb 2020 15:25:12 +0200 Subject: [PATCH] smbd: Add a "done:" exit for get_posix_fsp() We'll have another exit with the next commit Signed-off-by: Volker Lendecke Reviewed-by: Jeremy Allison --- source3/smbd/trans2.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/source3/smbd/trans2.c b/source3/smbd/trans2.c index d263c8834f7..2617da9b17a 100644 --- a/source3/smbd/trans2.c +++ b/source3/smbd/trans2.c @@ -148,7 +148,8 @@ static NTSTATUS get_posix_fsp(connection_struct *conn, smb_fname_tmp = cp_smb_filename(talloc_tos(), smb_fname); if (smb_fname_tmp == NULL) { - return NT_STATUS_NO_MEMORY; + status = NT_STATUS_NO_MEMORY; + goto done; } status = SMB_VFS_CREATE_FILE( @@ -172,6 +173,7 @@ static NTSTATUS get_posix_fsp(connection_struct *conn, NULL, /* in_context */ NULL); /* out_context */ +done: TALLOC_FREE(smb_fname_tmp); return status; } -- 2.47.2