git.samba.org
/
idra
/
samba.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
366333c
)
s4:ntvfs/posix/pvfs_wait.c - fix a "calculated value unused" warning
author
Matthias Dieter Wallnöfer
<mdw@samba.org>
Fri, 21 May 2010 21:14:19 +0000
(23:14 +0200)
committer
Matthias 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
patch
|
blob
|
history
diff --git
a/source4/ntvfs/posix/pvfs_wait.c
b/source4/ntvfs/posix/pvfs_wait.c
index e6977efe5d243de09e62ed023c41f27a76a42367..876ce52797814fecb605358dfef732ea36f01d0d 100644
(file)
--- 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);
+ }
}