Rev 149: make sure we don't double free in the async lock handler in http://samba.org/~tridge/ctdb

tridge at samba.org tridge at samba.org
Wed Apr 18 05:27:26 GMT 2007


------------------------------------------------------------
revno: 149
revision-id: tridge at samba.org-20070418052726-e7908fbec401dbef
parent: tridge at samba.org-20070418044202-2c70b494262610cb
committer: Andrew Tridgell <tridge at samba.org>
branch nick: tridge
timestamp: Wed 2007-04-18 15:27:26 +1000
message:
  make sure we don't double free in the async lock handler
modified:
  common/ctdb_ltdb.c             ctdb_ltdb.c-20061128065342-to93h6eejj5kon81-2
=== modified file 'common/ctdb_ltdb.c'
--- a/common/ctdb_ltdb.c	2007-04-18 01:20:24 +0000
+++ b/common/ctdb_ltdb.c	2007-04-18 05:27:26 +0000
@@ -287,6 +287,10 @@
 		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;
 }



More information about the samba-cvs mailing list