svn commit: samba r3631 - in branches/SAMBA_4_0/source/ntvfs/posix: .

tridge at samba.org tridge at samba.org
Tue Nov 9 02:12:57 GMT 2004


Author: tridge
Date: 2004-11-09 02:12:57 +0000 (Tue, 09 Nov 2004)
New Revision: 3631

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

Log:
a couple of tweaks to the talloc hierarchy for async requests in
pvfs. This prevents a possible crash due to free ordering on
unexpected disconnect.

Modified:
   branches/SAMBA_4_0/source/ntvfs/posix/pvfs_open.c
   branches/SAMBA_4_0/source/ntvfs/posix/pvfs_wait.c


Changeset:
Modified: branches/SAMBA_4_0/source/ntvfs/posix/pvfs_open.c
===================================================================
--- branches/SAMBA_4_0/source/ntvfs/posix/pvfs_open.c	2004-11-09 01:04:29 UTC (rev 3630)
+++ branches/SAMBA_4_0/source/ntvfs/posix/pvfs_open.c	2004-11-09 02:12:57 UTC (rev 3631)
@@ -669,6 +669,8 @@
 		return NT_STATUS_NO_MEMORY;
 	}
 
+	talloc_steal(pvfs, r);
+
 	return NT_STATUS_OK;
 }
 

Modified: branches/SAMBA_4_0/source/ntvfs/posix/pvfs_wait.c
===================================================================
--- branches/SAMBA_4_0/source/ntvfs/posix/pvfs_wait.c	2004-11-09 01:04:29 UTC (rev 3630)
+++ branches/SAMBA_4_0/source/ntvfs/posix/pvfs_wait.c	2004-11-09 02:12:57 UTC (rev 3631)
@@ -127,7 +127,7 @@
 	struct timed_event te;
 	struct pvfs_wait *pwait;
 
-	pwait = talloc_p(req, struct pvfs_wait);
+	pwait = talloc_p(pvfs, struct pvfs_wait);
 	if (pwait == NULL) {
 		return NULL;
 	}



More information about the samba-cvs mailing list