diff options
Diffstat (limited to 'source4/ntvfs/posix/pvfs_wait.c')
-rw-r--r-- | source4/ntvfs/posix/pvfs_wait.c | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/source4/ntvfs/posix/pvfs_wait.c b/source4/ntvfs/posix/pvfs_wait.c index a226918877..968f659421 100644 --- a/source4/ntvfs/posix/pvfs_wait.c +++ b/source4/ntvfs/posix/pvfs_wait.c @@ -137,7 +137,7 @@ static int pvfs_wait_destructor(void *ptr) pwait->msg_ctx = pvfs->tcon->smb_conn->connection->messaging_ctx; pwait->ev = req->tcon->smb_conn->connection->event.ctx; pwait->msg_type = msg_type; - pwait->req = req; + pwait->req = talloc_reference(pwait, req); pwait->pvfs = pvfs; /* setup a timer */ @@ -162,10 +162,6 @@ static int pvfs_wait_destructor(void *ptr) /* make sure we cleanup the timer and message handler */ talloc_set_destructor(pwait, pvfs_wait_destructor); - /* make sure that on a disconnect the request is not destroyed - before pvfs */ - talloc_steal(pvfs, req); - return pwait; } |