mirror of
https://github.com/NLnetLabs/unbound.git
synced 2026-01-25 08:02:54 -05:00
No leakage warning for double serviced callback.
git-svn-id: file:///svn/unbound/trunk@582 be551aaa-1e26-0410-a405-d3ace91eadb9
This commit is contained in:
parent
b33c39334b
commit
4016aa755e
3 changed files with 13 additions and 1 deletions
|
|
@ -1,3 +1,7 @@
|
|||
4 September 2007: Wouter
|
||||
- fixup of Leakage warning when serviced queries processed multiple
|
||||
callbacks for the same query from the same server.
|
||||
|
||||
3 September 2007: Wouter
|
||||
- Fixed error in iterator that would cause assertion failure in
|
||||
validator. CNAME to a NXDOMAIN response was collated into a response
|
||||
|
|
|
|||
|
|
@ -434,6 +434,7 @@ outside_network_create(struct comm_base *base, size_t bufsize,
|
|||
outnet->num_tcp = num_tcp;
|
||||
outnet->infra = infra;
|
||||
outnet->rnd = rnd;
|
||||
outnet->svcd_overhead = 0;
|
||||
#ifndef INET6
|
||||
do_ip6 = 0;
|
||||
#endif
|
||||
|
|
@ -996,6 +997,7 @@ serviced_callbacks(struct serviced_query* sq, int error, struct comm_point* c,
|
|||
error = NETEVENT_CLOSED;
|
||||
c = NULL;
|
||||
}
|
||||
sq->outnet->svcd_overhead = backlen;
|
||||
}
|
||||
while(p) {
|
||||
n = p->next;
|
||||
|
|
@ -1007,8 +1009,10 @@ serviced_callbacks(struct serviced_query* sq, int error, struct comm_point* c,
|
|||
(void)(*p->cb)(c, p->cb_arg, error, rep);
|
||||
p = n;
|
||||
}
|
||||
if(backup_p)
|
||||
if(backup_p) {
|
||||
free(backup_p);
|
||||
sq->outnet->svcd_overhead = 0;
|
||||
}
|
||||
verbose(VERB_ALGO, "svcd callbacks end");
|
||||
log_assert(sq->cblist == NULL);
|
||||
serviced_delete(sq);
|
||||
|
|
@ -1260,6 +1264,7 @@ size_t outnet_get_mem(struct outside_network* outnet)
|
|||
s += (sizeof(struct pending) + comm_timer_get_mem(NULL)) *
|
||||
outnet->pending->count;
|
||||
s += sizeof(*outnet->serviced);
|
||||
s += outnet->svcd_overhead;
|
||||
RBTREE_FOR(sq, struct serviced_query*, outnet->serviced) {
|
||||
s += sizeof(*sq) + sq->qbuflen;
|
||||
for(sb = sq->cblist; sb; sb = sb->next)
|
||||
|
|
|
|||
|
|
@ -64,6 +64,9 @@ struct outside_network {
|
|||
/** buffer shared by UDP connections, since there is only one
|
||||
datagram at any time. */
|
||||
ldns_buffer* udp_buff;
|
||||
/** serviced_callbacks malloc overhead when processing multiple
|
||||
* identical serviced queries to the same server. */
|
||||
size_t svcd_overhead;
|
||||
|
||||
/**
|
||||
* Array of udp comm point* that are used to listen to pending events.
|
||||
|
|
|
|||
Loading…
Reference in a new issue