[prev in list] [next in list] [prev in thread] [next in thread] 

List:       samba-cvs
Subject:    svn commit: samba r13748 - in branches/SAMBA_3_0/source/smbd: .
From:       jra () samba ! org
Date:       2006-02-28 6:41:08
Message-ID: 20060228064108.7F334162ACD () lists ! samba ! org
[Download RAW message or body]

Author: jra
Date: 2006-02-28 06:41:07 +0000 (Tue, 28 Feb 2006)
New Revision: 13748

WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=13748

Log:
Don't reference memory after we just freed it (Doh!).
Thanks to tridge's changes to the directory delete on close tests
for catching this.
Jeremy.

Modified:
   branches/SAMBA_3_0/source/smbd/close.c


Changeset:
Modified: branches/SAMBA_3_0/source/smbd/close.c
===================================================================
--- branches/SAMBA_3_0/source/smbd/close.c	2006-02-28 06:33:31 UTC (rev 13747)
+++ branches/SAMBA_3_0/source/smbd/close.c	2006-02-28 06:41:07 UTC (rev 13748)
@@ -363,8 +363,6 @@
 
 	delete_dir = (lck->delete_on_close | lck->initial_delete_on_close);
 
-	TALLOC_FREE(lck);
-
 	if ((close_type == NORMAL_CLOSE || close_type == SHUTDOWN_CLOSE) &&
 				delete_dir &&
 				lck->delete_token) {
@@ -382,6 +380,8 @@
 				lck->delete_token->groups,
 				NULL);
 
+		TALLOC_FREE(lck);
+
 		ok = rmdir_internals(fsp->conn, fsp->fsp_name);
 
 		DEBUG(5,("close_directory: %s. Delete on close was set - deleting directory %s.\n",
@@ -402,6 +402,7 @@
 		}
 		process_pending_change_notify_queue((time_t)0);
 	} else {
+		TALLOC_FREE(lck);
 		remove_pending_change_notify_requests_by_fid(fsp, NT_STATUS_CANCELLED);
 	}
 

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic