summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSwen Schillig <swen@vnet.ibm.com>2018-02-21 13:34:28 +0100
committerJeremy Allison <jra@samba.org>2018-03-31 00:07:18 +0200
commitd6a9dc6e249fc1785a3b6e00bdee555f439b5d24 (patch)
tree0134ae6fb464be103ab075c412097314c2e18041
parentaba3d508028567ccbfe8ea986d8f2b3f48af6215 (diff)
downloadsamba-d6a9dc6e249fc1785a3b6e00bdee555f439b5d24.tar.gz
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 <swen@vnet.ibm.com> Reviewed-by: Martin Schwenke <martin@meltin.net> Reviewed-by: Jeremy Allison <jra@samba.org>
-rw-r--r--ctdb/client/ctdb_client.c2
1 files changed, 1 insertions, 1 deletions
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;