SQUASH - fix fix for disconnect/close race
authorMichael Adam <obnox@samba.org>
Thu, 23 Feb 2012 14:08:15 +0000 (15:08 +0100)
committerStefan Metzmacher <metze@samba.org>
Thu, 10 May 2012 16:42:00 +0000 (18:42 +0200)
source3/smbd/close.c

index e96d0f31144cd6f134e03711788d3adc3d2ef048..3d621124ed516f7fd8e6af2c5e8721b16c150930 100644 (file)
@@ -712,6 +712,9 @@ static NTSTATUS close_normal_file(struct smb_request *req, files_struct *fsp,
                }
 #endif
 
+                       tmp = close_filestruct(fsp);
+                       status = ntstatus_keeperror(status, tmp);
+
                        TALLOC_FREE(lck);
 
                        tmp = fd_close(fsp);
@@ -719,6 +722,9 @@ static NTSTATUS close_normal_file(struct smb_request *req, files_struct *fsp,
                        file_free(req, fsp);
                        return status;
                }
+
+               TALLOC_FREE(lck);
+
 #if 0
                TALLOC_FREE(lck);