summaryrefslogtreecommitdiff
path: root/source3/locking
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>2006-07-14 23:23:39 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 11:19:21 -0500
commitd22d540c326f4964566f1c3dcb72df7986782215 (patch)
tree3c075298fe0ed09556cc27c644c42ce134d7c1be /source3/locking
parent2203228c791761bcab07961da725488636bee8df (diff)
downloadsamba-d22d540c326f4964566f1c3dcb72df7986782215.tar.gz
samba-d22d540c326f4964566f1c3dcb72df7986782215.tar.bz2
samba-d22d540c326f4964566f1c3dcb72df7986782215.zip
r17041: Trying to track down a *big* memory leak in the new lock code.
Fix a small one first.... (easy to valgrind). Jeremy (This used to be commit 43d24fbd41ed745a5b21514b526e655663c509ee)
Diffstat (limited to 'source3/locking')
-rw-r--r--source3/locking/brlock.c2
-rw-r--r--source3/locking/posix.c1
2 files changed, 2 insertions, 1 deletions
diff --git a/source3/locking/brlock.c b/source3/locking/brlock.c
index e99d4ab900..376c2e30ba 100644
--- a/source3/locking/brlock.c
+++ b/source3/locking/brlock.c
@@ -1259,7 +1259,7 @@ void brl_close_fnum(struct byte_range_lock *br_lck)
/* 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++) {
diff --git a/source3/locking/posix.c b/source3/locking/posix.c
index 9a50f55c09..586de5745b 100644
--- a/source3/locking/posix.c
+++ b/source3/locking/posix.c
@@ -539,6 +539,7 @@ static int get_windows_lock_ref_count(files_struct *fsp)
} 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 ));