From: Andrew Tridgell Date: Sat, 7 Apr 2007 00:58:14 +0000 (+1000) Subject: another memory leak X-Git-Tag: tevent-0.9.20~348^2~2956 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=76c666fe52fc1448fac70fc27ad31dbbd0ce8dd3;p=thirdparty%2Fsamba.git another memory leak (This used to be ctdb commit 10466fe11da71c93fa764bea2b3e1e741c113f9c) --- diff --git a/ctdb/common/ctdb_call.c b/ctdb/common/ctdb_call.c index 7b4094fe4aa..77ec8728524 100644 --- a/ctdb/common/ctdb_call.c +++ b/ctdb/common/ctdb_call.c @@ -547,6 +547,8 @@ struct ctdb_call_state *ctdb_call_local_send(struct ctdb_db_context *ctdb_db, state = talloc_zero(ctdb_db, struct ctdb_call_state); CTDB_NO_MEMORY_NULL(ctdb, state); + talloc_steal(state, data->dptr); + state->state = CTDB_CALL_DONE; state->node = ctdb->nodes[ctdb->vnn]; state->call = *call; @@ -579,7 +581,7 @@ struct ctdb_call_state *ctdb_call_send(struct ctdb_db_context *ctdb_db, struct c locally. To find out if we are the dmaster we need to look in our ltdb */ - ret = ctdb_ltdb_fetch(ctdb_db, call->key, &header, ctdb, &data); + ret = ctdb_ltdb_fetch(ctdb_db, call->key, &header, ctdb_db, &data); if (ret != 0) return NULL; if (header.dmaster == ctdb->vnn && !(ctdb->flags & CTDB_FLAG_SELF_CONNECT)) {