From: Swen Schillig Date: Wed, 21 Feb 2018 12:34:28 +0000 (+0100) Subject: ctdb: Use provided mem_ctx for newly allocated memory X-Git-Tag: talloc-2.1.13~104 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=d6a9dc6e249fc1785a3b6e00bdee555f439b5d24;p=thirdparty%2Fsamba.git ctdb: Use provided mem_ctx for newly allocated memory ctdb_call_local is called with a mem_ctx parameter which should be used for newly allocated memory. This is safe because all allocations of this context are freed before this function returns. Signed-off-by: Swen Schillig Reviewed-by: Martin Schwenke Reviewed-by: Jeremy Allison --- diff --git a/ctdb/client/ctdb_client.c b/ctdb/client/ctdb_client.c index d399cb551f6..c3bb435a641 100644 --- a/ctdb/client/ctdb_client.c +++ b/ctdb/client/ctdb_client.c @@ -86,7 +86,7 @@ int ctdb_call_local(struct ctdb_db_context *ctdb_db, struct ctdb_call *call, struct ctdb_registered_call *fn; struct ctdb_context *ctdb = ctdb_db->ctdb; - c = talloc(ctdb, struct ctdb_call_info); + c = talloc(mem_ctx, struct ctdb_call_info); CTDB_NO_MEMORY(ctdb, c); c->key = call->key;