1
0
forked from rpms/bind
bind/SOURCES/bind-95-rh452060.patch

43 lines
1014 B
Diff
Raw Normal View History

2019-08-05 14:40:24 +00:00
diff --git a/bin/dig/dighost.c b/bin/dig/dighost.c
2020-01-21 22:30:08 +00:00
index c06c804..e75b8b7 100644
2019-08-05 14:40:24 +00:00
--- a/bin/dig/dighost.c
+++ b/bin/dig/dighost.c
2020-01-21 22:30:08 +00:00
@@ -1816,6 +1816,13 @@ clear_query(dig_query_t *query) {
2019-08-05 14:40:24 +00:00
if (query->timer != NULL)
isc_timer_detach(&query->timer);
+
+ if (query->waiting_senddone) {
+ debug("send_done not yet called");
2020-01-21 22:30:08 +00:00
+ query->pending_free = true;
2019-08-05 14:40:24 +00:00
+ return;
+ }
+
lookup = query->lookup;
if (lookup->current_query == query)
2020-01-21 22:30:08 +00:00
@@ -1841,10 +1848,7 @@ clear_query(dig_query_t *query) {
2019-08-05 14:40:24 +00:00
isc_mempool_put(commctx, query->recvspace);
isc_buffer_invalidate(&query->recvbuf);
isc_buffer_invalidate(&query->lengthbuf);
- if (query->waiting_senddone)
2020-01-21 22:30:08 +00:00
- query->pending_free = true;
2019-08-05 14:40:24 +00:00
- else
- isc_mem_free(mctx, query);
+ isc_mem_free(mctx, query);
}
/*%
2020-01-21 22:30:08 +00:00
@@ -2895,9 +2899,9 @@ send_done(isc_task_t *_task, isc_event_t *event) {
2019-08-05 14:40:24 +00:00
isc_event_free(&event);
if (query->pending_free)
- isc_mem_free(mctx, query);
+ clear_query(query);
- check_if_done();
+ check_next_lookup(l);
UNLOCK_LOOKUP;
}