durable_reconnect: fix a segfault
authorMichael Adam <obnox@samba.org>
Sat, 18 Feb 2012 15:30:19 +0000 (16:30 +0100)
committerStefan Metzmacher <metze@samba.org>
Thu, 10 May 2012 16:41:52 +0000 (18:41 +0200)
source3/smbd/smb2_create.c

index 28d50740ba44a210b4dc8902e0fb96ce4bc4ca3b..4fdb52e91ebbea5200ef387e4e169f9dcea732e8 100644 (file)
@@ -429,17 +429,18 @@ static NTSTATUS new_durable_reconnect_fsp(struct smbXsrv_open *op,
                goto fail;
        }
 
-       status = fsp_set_smb_fname(fsp, smb_fname);
-       if (!NT_STATUS_IS_OK(status)) {
-               goto fail;
-       }
-
        fsp->fh->ref_count = 1;
        fsp->fh->fd = -1;
        fsp->fh->gen_id = get_gen_count(sconn);
 
        fsp->conn = conn;
 
+       status = fsp_set_smb_fname(fsp, smb_fname);
+       if (!NT_STATUS_IS_OK(status)) {
+               goto fail;
+       }
+
+
 
        /* success */