summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--source4/ntvfs/posix/pvfs_wait.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/source4/ntvfs/posix/pvfs_wait.c b/source4/ntvfs/posix/pvfs_wait.c
index e6977efe5d..876ce52797 100644
--- a/source4/ntvfs/posix/pvfs_wait.c
+++ b/source4/ntvfs/posix/pvfs_wait.c
@@ -102,9 +102,11 @@ static void pvfs_wait_timeout(struct tevent_context *ev,
pwait->reason = PVFS_WAIT_TIMEOUT;
- talloc_reference(ev, req);
- ntvfs_async_setup(pwait->req, pwait);
- talloc_unlink(ev, req);
+ req = talloc_reference(ev, req);
+ if (req != NULL) {
+ ntvfs_async_setup(req, pwait);
+ talloc_unlink(ev, req);
+ }
}