ctdb-server: Only talloc_set_destructor when required
authorSwen Schillig <swen@vnet.ibm.com>
Tue, 20 Feb 2018 16:08:59 +0000 (17:08 +0100)
committerJeremy Allison <jra@samba.org>
Fri, 30 Mar 2018 22:07:18 +0000 (00:07 +0200)
commitb40bcb094d6aae00cae1b64a25ad3cdb39208449
tree2168c260306156db2d692700ead6c3d1b8c6c753
parent3269cd67078ec28d72168e1a98ef4329243ffa7e
ctdb-server: Only talloc_set_destructor when required

The destructor is only needed once the state got added to the DLIST.
Therefore, move the setting of the destructor to after the addition
of state to the DLIST.

Signed-off-by: Swen Schillig <swen@vnet.ibm.com>
Reviewed-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Jeremy Allison <jra@samba.org>
ctdb/server/ctdb_call.c