1
0
mirror of https://github.com/samba-team/samba.git synced 2024-12-22 13:34:15 +03:00

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>
This commit is contained in:
Swen Schillig 2018-02-21 13:34:28 +01:00 committed by Jeremy Allison
parent aba3d50802
commit d6a9dc6e24

View File

@ -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;