ctdb-recoverd: Free cluster mutex handler on failure to take lock
authorMartin Schwenke <martin@meltin.net>
Mon, 21 Jan 2019 05:28:28 +0000 (16:28 +1100)
committerKarolin Seeger <kseeger@samba.org>
Tue, 5 Mar 2019 19:29:11 +0000 (19:29 +0000)
commit6ee34859e86ddc5870be9b9034b1e5a3901a2e4b
tree4ab8bec50ca7aaed8436e46dbf118f8621cca60a
parenta4a8351c1f3fdbf43a1b55d611472a62b393fdcb
ctdb-recoverd: Free cluster mutex handler on failure to take lock

If nested events occur while the file descriptor handler is still
active then chaos can ensue.  For example, if a node is banned and the
lock is explicitly cancelled (e.g. due to election loss) then
double-talloc-free()s abound.

BUG: https://bugzilla.samba.org/show_bug.cgi?id=13800

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
(cherry picked from commit 621658cbed5d91d7096fc208bac2ff93a1880e7d)
ctdb/server/ctdb_recoverd.c