locking: Set destructor when lock_context is created
authorAmitay Isaacs <amitay@gmail.com>
Mon, 1 Jun 2015 14:22:07 +0000 (00:22 +1000)
committerAmitay Isaacs <amitay@gmail.com>
Mon, 15 Jun 2015 02:13:01 +0000 (12:13 +1000)
commite7447459742a491b31bafb94555db4c17340622f
treea23d501eaf61b3ba5ce51b213ed74b5fbb3799c4
parent53e21c2aafa9c4912fd2bd90ef16570e4ec772a3
locking: Set destructor when lock_context is created

There is already code in the destructor to correctly remove it from the
pending or the active queue.  This also ensures that when lock context
is in pending queue and if the lock request gets freed, the lock context
is correctly removed from the pending queue.

Thanks to Stefan Metzmacher for noticing this and suggesting the fix.

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

Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
(Imported from commit 5ae6a8f2fff5b5f4d46f496fd83f555be4b3d448)
server/ctdb_lock.c