summaryrefslogtreecommitdiffstats
path: root/ctdb/common/ctdb_ltdb.c
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2007-05-05 17:19:59 +1000
committerAndrew Tridgell <tridge@samba.org>2007-05-05 17:19:59 +1000
commit542b76136e7135e9be4af5e0202e4205d5bde016 (patch)
tree58319504e15772f79019b0da825c1a0e5bef4699 /ctdb/common/ctdb_ltdb.c
parentcc8ac1ca6b540f836b92a974949dac832b90a83d (diff)
downloadsamba-542b76136e7135e9be4af5e0202e4205d5bde016.tar.gz
samba-542b76136e7135e9be4af5e0202e4205d5bde016.tar.xz
samba-542b76136e7135e9be4af5e0202e4205d5bde016.zip
- take advantage of the new EVENT_FD_AUTOCLOSE flag
- use the tdb_chainlock_mark() call to allow us to guarantee forward progress in the ctdb_lockwait code (This used to be ctdb commit e201e98aad0fef6a779a80f3b1ae7792953e2d6b)
Diffstat (limited to 'ctdb/common/ctdb_ltdb.c')
-rw-r--r--ctdb/common/ctdb_ltdb.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/ctdb/common/ctdb_ltdb.c b/ctdb/common/ctdb_ltdb.c
index 312d1b98c39..37f4627c564 100644
--- a/ctdb/common/ctdb_ltdb.c
+++ b/ctdb/common/ctdb_ltdb.c
@@ -193,7 +193,6 @@ static void lock_fetch_callback(void *p)
{
struct lock_fetch_state *state = talloc_get_type(p, struct lock_fetch_state);
state->recv_pkt(state->recv_context, (uint8_t *)state->hdr, state->hdr->length);
- talloc_free(state);
DEBUG(2,(__location__ " PACKET REQUEUED\n"));
}
@@ -252,7 +251,7 @@ int ctdb_ltdb_lock_requeue(struct ctdb_db_context *ctdb_db,
return 0;
}
- state = talloc(ctdb_db, struct lock_fetch_state);
+ state = talloc(hdr, struct lock_fetch_state);
state->ctdb = ctdb_db->ctdb;
state->hdr = hdr;
state->recv_pkt = recv_pkt;