s4:ntvfs/posix/pvfs_wait.c - fix a "calculated value unused" warning
authorMatthias Dieter Wallnöfer <mdw@samba.org>
Fri, 21 May 2010 21:14:19 +0000 (23:14 +0200)
committerMatthias Dieter Wallnöfer <mdw@samba.org>
Fri, 21 May 2010 21:35:57 +0000 (23:35 +0200)
The calculated value is "req" (!= NULL) if "talloc_reference" did work correctly
or it is NULL if we ran out of memory.

source4/ntvfs/posix/pvfs_wait.c

index e6977efe5d243de09e62ed023c41f27a76a42367..876ce52797814fecb605358dfef732ea36f01d0d 100644 (file)
@@ -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);
+       }
 }