From: Volker Lendecke Date: Wed, 5 Feb 2020 13:25:12 +0000 (+0200) Subject: smbd: Add a "done:" exit for get_posix_fsp() X-Git-Tag: ldb-2.1.1~129 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=3b92cbdfa9057a89d404d808b5253bcc83c4f60d;p=thirdparty%2Fsamba.git 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 --- 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; }