From: Andrew Tridgell Date: Wed, 18 Apr 2007 05:27:26 +0000 (+1000) Subject: make sure we don't double free in the async lock handler X-Git-Tag: tevent-0.9.20~348^2~2882 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=706003088925c39020b1dbc66e4dbc9315a1696d;p=thirdparty%2Fsamba.git make sure we don't double free in the async lock handler (This used to be ctdb commit 67d3e64f82fd71ff1e32bf377d0cf1f636b9602f) --- diff --git a/ctdb/common/ctdb_ltdb.c b/ctdb/common/ctdb_ltdb.c index 823c296be0d..1d34d90e2ed 100644 --- a/ctdb/common/ctdb_ltdb.c +++ b/ctdb/common/ctdb_ltdb.c @@ -287,6 +287,10 @@ int ctdb_ltdb_lock_fetch_requeue(struct ctdb_db_context *ctdb_db, return -1; } + /* we need to move the packet off the temporary context in ctdb_recv_pkt(), + so it won't be freed yet */ + talloc_steal(ctdb_db, hdr); + /* now tell the caller than we will retry asynchronously */ return -2; }