summaryrefslogtreecommitdiff
path: root/source4
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2004-11-09 10:50:13 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 13:05:41 -0500
commitcc0e67015696ce625033e9b2d49142fabed19c7e (patch)
treed0bf6910e035e3d59b96eab6393b8a840c1d4923 /source4
parent77ff35de861388d80146505bc07682c7da11adfe (diff)
downloadsamba-cc0e67015696ce625033e9b2d49142fabed19c7e.tar.gz
samba-cc0e67015696ce625033e9b2d49142fabed19c7e.tar.bz2
samba-cc0e67015696ce625033e9b2d49142fabed19c7e.zip
r3635: fixed the crash from the BASE-DISCONNECT test
(This used to be commit bdabb3f836d56ab0af9201321c00c8b385e053a5)
Diffstat (limited to 'source4')
-rw-r--r--source4/ntvfs/posix/pvfs_lock.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/source4/ntvfs/posix/pvfs_lock.c b/source4/ntvfs/posix/pvfs_lock.c
index a2691cb550..485199e6f8 100644
--- a/source4/ntvfs/posix/pvfs_lock.c
+++ b/source4/ntvfs/posix/pvfs_lock.c
@@ -188,6 +188,7 @@ static void pvfs_pending_lock_continue(void *private, enum pvfs_wait_notice reas
if (pending->wait_handle == NULL) {
pvfs_lock_async_failed(pvfs, req, f, locks, i, NT_STATUS_NO_MEMORY);
} else {
+ talloc_steal(pending, pending->wait_handle);
DLIST_ADD(f->pending_list, pending);
}
return;
@@ -224,7 +225,6 @@ void pvfs_lock_close(struct pvfs_state *pvfs, struct pvfs_file *f)
for (p=f->pending_list;p;p=next) {
next = p->next;
DLIST_REMOVE(f->pending_list, p);
- talloc_free(p->wait_handle);
p->req->async_states->status = NT_STATUS_RANGE_NOT_LOCKED;
p->req->async_states->send_fn(p->req);
}
@@ -374,6 +374,7 @@ NTSTATUS pvfs_lock(struct ntvfs_module_context *ntvfs,
if (pending->wait_handle == NULL) {
return NT_STATUS_NO_MEMORY;
}
+ talloc_steal(pending, pending->wait_handle);
DLIST_ADD(f->pending_list, pending);
return NT_STATUS_OK;
}