Clean up the call_states correctly
authorVolker Lendecke <vl@samba.org>
Tue, 17 Apr 2007 21:40:33 +0000 (23:40 +0200)
committerVolker Lendecke <vl@samba.org>
Tue, 17 Apr 2007 21:40:33 +0000 (23:40 +0200)
(This used to be ctdb commit 9fcc40a2ddd8f7f62bdd8b5ab71d182220e23af0)

ctdb/common/ctdb_call.c

index 4363b189cc45f192f6d722cc3be528c3454babf1..aa88829fa1c3320b5a068444e9b3db12c0b05737 100644 (file)
@@ -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) {