From e04e99585cabd225c79cb492d02509514f030486 Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Mon, 22 Jan 2007 04:04:36 +0000 Subject: r20944: if a call has been destroyed before a reply comes in then discard the reply (This used to be commit 05d19af38c1e75ba65ed2755c6087df1f937ee2a) --- source4/cluster/ctdb/common/ctdb_call.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'source4/cluster/ctdb') diff --git a/source4/cluster/ctdb/common/ctdb_call.c b/source4/cluster/ctdb/common/ctdb_call.c index 7883be8a0a..648b2b0bc9 100644 --- a/source4/cluster/ctdb/common/ctdb_call.c +++ b/source4/cluster/ctdb/common/ctdb_call.c @@ -390,6 +390,7 @@ void ctdb_reply_call(struct ctdb_context *ctdb, struct ctdb_req_header *hdr) TDB_DATA reply_data; state = idr_find(ctdb->idr, hdr->reqid); + if (state == NULL) return; reply_data.dptr = c->data; reply_data.dsize = c->datalen; @@ -415,6 +416,7 @@ void ctdb_reply_dmaster(struct ctdb_context *ctdb, struct ctdb_req_header *hdr) TDB_DATA data; state = idr_find(ctdb->idr, hdr->reqid); + if (state == NULL) return; data.dptr = c->data; data.dsize = c->datalen; @@ -450,6 +452,7 @@ void ctdb_reply_error(struct ctdb_context *ctdb, struct ctdb_req_header *hdr) struct ctdb_call_state *state; state = idr_find(ctdb->idr, hdr->reqid); + if (state == NULL) return; talloc_steal(state, c); @@ -471,6 +474,7 @@ void ctdb_reply_redirect(struct ctdb_context *ctdb, struct ctdb_req_header *hdr) struct ctdb_call_state *state; state = idr_find(ctdb->idr, hdr->reqid); + if (state == NULL) return; talloc_steal(state, c); -- cgit