git.samba.org
/
obnox
/
samba
/
samba-obnox.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
3b3b5b0
)
dbwrap: Fix CID 1002092 Uninitialized scalar variable
author
Volker Lendecke
<vl@samba.org>
Sun, 12 May 2013 10:33:49 +0000
(12:33 +0200)
committer
Volker Lendecke
<vl@samba.org>
Sun, 12 May 2013 13:56:08 +0000
(15:56 +0200)
We don't set saved_errno in the ret==0 case.
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Ira Cooper <ira@samba.org>
lib/dbwrap/dbwrap_ntdb.c
patch
|
blob
|
history
diff --git
a/lib/dbwrap/dbwrap_ntdb.c
b/lib/dbwrap/dbwrap_ntdb.c
index 5be7b842e2183dce5dba713c0e1baef25bdb081b..658c48734106b5e2da6f888e3b48f8a00b02ee51 100644
(file)
--- a/
lib/dbwrap/dbwrap_ntdb.c
+++ b/
lib/dbwrap/dbwrap_ntdb.c
@@
-326,7
+326,9
@@
static int timeout_lock(int fd, int rw, off_t off, off_t len, bool waitflag,
}
alarm(0);
- errno = saved_errno;
+ if (ret != 0) {
+ errno = saved_errno;
+ }
return ret;
}