diff options
author | Volker Lendecke <vl@samba.org> | 2021-03-03 19:15:31 +0100 |
---|---|---|
committer | Karolin Seeger <kseeger@samba.org> | 2021-03-08 10:58:06 +0000 |
commit | f912b8f600a2e85b594c0ae84d687a49f958ebfa (patch) | |
tree | 857bd65ed70ae0961b392385bbcfdbd902f0ee73 | |
parent | 02264306200fc718c066ea2ecdadd1f03ffb9ea3 (diff) | |
download | samba-f912b8f600a2e85b594c0ae84d687a49f958ebfa.tar.gz |
g_lock: Fix uninitalized variable reads
If dbwrap_watched_watch_recv() returns IO_TIMEOUT, "blockerdead" might
be an uninitialized non-false, and further down we'll remove the wrong
exclusive locker.
Bug: https://bugzilla.samba.org/show_bug.cgi?id=14636
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
Autobuild-User(master): Stefan Metzmacher <metze@samba.org>
Autobuild-Date(master): Fri Mar 5 11:22:07 UTC 2021 on sn-devel-184
(cherry picked from commit 654c18a244f060d81280493a324b98602a69dbbf)
Autobuild-User(v4-14-test): Karolin Seeger <kseeger@samba.org>
Autobuild-Date(v4-14-test): Mon Mar 8 10:58:06 UTC 2021 on sn-devel-184
-rw-r--r-- | source3/lib/g_lock.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/source3/lib/g_lock.c b/source3/lib/g_lock.c index c36539393e1..36b527706da 100644 --- a/source3/lib/g_lock.c +++ b/source3/lib/g_lock.c @@ -646,8 +646,8 @@ static void g_lock_lock_retry(struct tevent_req *subreq) struct g_lock_lock_state *state = tevent_req_data( req, struct g_lock_lock_state); struct g_lock_lock_fn_state fn_state; - struct server_id blocker; - bool blockerdead; + struct server_id blocker = { .pid = 0 }; + bool blockerdead = false; NTSTATUS status; status = dbwrap_watched_watch_recv(subreq, &blockerdead, &blocker); |