summaryrefslogtreecommitdiff
path: root/source3/locking
diff options
context:
space:
mode:
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 ));