From: Andrew Tridgell Date: Tue, 10 Apr 2007 03:05:23 +0000 (+1000) Subject: fix a possible free after use X-Git-Tag: tevent-0.9.20~348^2~2954 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=9958ded5eb061319ee487a2e836e16c0eace1030;p=thirdparty%2Fsamba.git fix a possible free after use (This used to be ctdb commit 55bc7ee10b9e9df32792b6b5779f094eb513069e) --- diff --git a/ctdb/common/ctdb_call.c b/ctdb/common/ctdb_call.c index 77ec8728524..4c9916d62b9 100644 --- a/ctdb/common/ctdb_call.c +++ b/ctdb/common/ctdb_call.c @@ -418,6 +418,10 @@ void ctdb_reply_call(struct ctdb_context *ctdb, struct ctdb_req_header *hdr) talloc_steal(state, c); + /* get an extra reference here - this prevents the free in ctdb_recv_pkt() + from freeing the data */ + (void)talloc_reference(state, c); + state->state = CTDB_CALL_DONE; }