From: Volker Lendecke Date: Tue, 17 Apr 2007 21:40:33 +0000 (+0200) Subject: Clean up the call_states correctly X-Git-Url: http://git.samba.org/?a=commitdiff_plain;h=9fcc40a2ddd8f7f62bdd8b5ab71d182220e23af0;p=metze%2Fctdb%2Fwip.git Clean up the call_states correctly --- diff --git a/common/ctdb_call.c b/common/ctdb_call.c index 4363b189..aa88829f 100644 --- a/common/ctdb_call.c +++ b/common/ctdb_call.c @@ -436,7 +436,7 @@ void ctdb_reply_call(struct ctdb_context *ctdb, struct ctdb_req_header *hdr) state->call.reply_data.dsize = c->datalen; state->call.status = c->status; - talloc_steal(state, c); + talloc_steal(c, state); /* get an extra reference here - this prevents the free in ctdb_recv_pkt() from freeing the data */ @@ -477,7 +477,7 @@ void ctdb_reply_dmaster(struct ctdb_context *ctdb, struct ctdb_req_header *hdr) data.dptr = c->data; data.dsize = c->datalen; - talloc_steal(state, c); + talloc_steal(c, state); /* we're now the dmaster - update our local ltdb with new header and data */ @@ -514,7 +514,7 @@ void ctdb_reply_error(struct ctdb_context *ctdb, struct ctdb_req_header *hdr) return; } - talloc_steal(state, c); + talloc_steal(c, state); state->state = CTDB_CALL_ERROR; state->errmsg = (char *)c->msg; @@ -544,7 +544,7 @@ void ctdb_reply_redirect(struct ctdb_context *ctdb, struct ctdb_req_header *hdr) return; } - talloc_steal(state, c); + talloc_steal(c, state); /* don't allow for too many redirects */ if (state->redirect_count++ == CTDB_MAX_REDIRECT) {