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)
committerAmitay Isaacs <amitay@samba.org>
Mon, 25 Feb 2019 01:12:16 +0000 (02:12 +0100)
commit621658cbed5d91d7096fc208bac2ff93a1880e7d
treee2c2613f2b24aa6fc63bd5f3dbc9c7e27132077c
parent82e7f38214896c2c200132bc6dde3348cfac16cc
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>
ctdb/server/ctdb_recoverd.c