svn commit: samba r17041 - in branches/SAMBA_3_0/source/locking: .
jra at samba.org
jra at samba.org
Fri Jul 14 23:23:40 GMT 2006
Author: jra
Date: 2006-07-14 23:23:39 +0000 (Fri, 14 Jul 2006)
New Revision: 17041
WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=17041
Log:
Trying to track down a *big* memory leak in the new lock code.
Fix a small one first.... (easy to valgrind).
Jeremy
Modified:
branches/SAMBA_3_0/source/locking/brlock.c
branches/SAMBA_3_0/source/locking/posix.c
Changeset:
Modified: branches/SAMBA_3_0/source/locking/brlock.c
===================================================================
--- branches/SAMBA_3_0/source/locking/brlock.c 2006-07-14 22:07:19 UTC (rev 17040)
+++ branches/SAMBA_3_0/source/locking/brlock.c 2006-07-14 23:23:39 UTC (rev 17041)
@@ -1259,7 +1259,7 @@
/* Copy the current lock array. */
locks_copy = TALLOC_MEMDUP(br_lck, locks, br_lck->num_locks * sizeof(struct lock_struct));
if (!locks_copy) {
- DEBUG(0,("brl_close_fnum: talloc fail.\n"));
+ smb_panic("brl_close_fnum: talloc fail.\n");
}
for (i=0; i < br_lck->num_locks; i++) {
Modified: branches/SAMBA_3_0/source/locking/posix.c
===================================================================
--- branches/SAMBA_3_0/source/locking/posix.c 2006-07-14 22:07:19 UTC (rev 17040)
+++ branches/SAMBA_3_0/source/locking/posix.c 2006-07-14 23:23:39 UTC (rev 17041)
@@ -539,6 +539,7 @@
} else {
memcpy(&lock_ref_count, dbuf.dptr, sizeof(int));
}
+ SAFE_FREE(dbuf.dptr);
DEBUG(10,("get_windows_lock_count for file %s = %d\n",
fsp->fsp_name, lock_ref_count ));
More information about the samba-cvs
mailing list