From: Amitay Isaacs Date: Mon, 11 Sep 2017 05:59:19 +0000 (+1000) Subject: ctdb-daemon: Free up record data if a call request is deferred X-Git-Tag: samba-4.6.9~65 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=bb709c18aa6de2e4027b4a51b78fe22617800ddd;p=thirdparty%2Fsamba.git ctdb-daemon: Free up record data if a call request is deferred BUG: https://bugzilla.samba.org/show_bug.cgi?id=13029 If a call request for a key (migration request) is in flight, then all the subsequent call requests for the same key are deferred. In that case, the data corresponding to key read from the local tdb is useless and there is no need to keep it around. Once the deferred call is reprocessed, the data corresponding to that key will be fetched again. Signed-off-by: Amitay Isaacs Reviewed-by: Martin Schwenke (cherry picked from commit 77c17b03cfc4734142fd86ba3cdd9663e75f34e3) --- diff --git a/ctdb/server/ctdb_daemon.c b/ctdb/server/ctdb_daemon.c index 122d884a0c9..4d6987a121e 100644 --- a/ctdb/server/ctdb_daemon.c +++ b/ctdb/server/ctdb_daemon.c @@ -675,6 +675,7 @@ static void daemon_request_call_from_client(struct ctdb_client *client, DEBUG(DEBUG_ERR,(__location__ " ctdb_ltdb_unlock() failed with error %d\n", ret)); } CTDB_DECREMENT_STAT(ctdb, pending_calls); + talloc_free(data.dptr); return; } }