smbd: Add a "done:" exit for get_posix_fsp()
authorVolker Lendecke <vl@samba.org>
Wed, 5 Feb 2020 13:25:12 +0000 (15:25 +0200)
committerJeremy Allison <jra@samba.org>
Fri, 7 Feb 2020 21:01:31 +0000 (21:01 +0000)
We'll have another exit with the next commit

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
source3/smbd/trans2.c

index d263c8834f797a9325f90540c9708dba6dfaa712..2617da9b17a4925ba1e9131d92ce17fe065e7413 100644 (file)
@@ -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;
 }