diff options
author | Volker Lendecke <vl@samba.org> | 2013-05-12 12:33:49 +0200 |
---|---|---|
committer | Volker Lendecke <vl@samba.org> | 2013-05-12 15:56:08 +0200 |
commit | 8b3d4eff9342de812d0d27759beeff5e4e7532d1 (patch) | |
tree | 611bd369038e8b4398b39b54c058eb0b26bbacf7 /lib | |
parent | 3b3b5b02555572e48a751ea19ef9dd771a3862da (diff) | |
download | samba-8b3d4eff9342de812d0d27759beeff5e4e7532d1.tar.gz samba-8b3d4eff9342de812d0d27759beeff5e4e7532d1.tar.bz2 samba-8b3d4eff9342de812d0d27759beeff5e4e7532d1.zip |
dbwrap: Fix CID 1002092 Uninitialized scalar variable
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>
Diffstat (limited to 'lib')
-rw-r--r-- | lib/dbwrap/dbwrap_ntdb.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/dbwrap/dbwrap_ntdb.c b/lib/dbwrap/dbwrap_ntdb.c index 5be7b842e2..658c487341 100644 --- 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; } |