]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
make sure we don't double free in the async lock handler
authorAndrew Tridgell <tridge@samba.org>
Wed, 18 Apr 2007 05:27:26 +0000 (15:27 +1000)
committerAndrew Tridgell <tridge@samba.org>
Wed, 18 Apr 2007 05:27:26 +0000 (15:27 +1000)
(This used to be ctdb commit 67d3e64f82fd71ff1e32bf377d0cf1f636b9602f)

ctdb/common/ctdb_ltdb.c

index 823c296be0dd29a8e6f48cb76c47b83c1143eb4c..1d34d90e2eda35946ba45b2a1910c1730a5cbf04 100644 (file)
@@ -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;
 }