Fortunately, unlike the issue fixed in the previous commit, the memleak
should be superficial and not become apparent, as the queries handled
here are managed by the stub stream, and will be freed when the stream
is closed.
Just for safety, and slightly reducing the runtime memory usage by the
stub stream.
* packet doesn't answer our question. In that case let's restart the query,
* now with the redirected question. We'll */
r = dns_query_go(q);
- if (r < 0)
+ if (r < 0) {
log_debug_errno(r, "Failed to restart query: %m");
+ dns_query_free(q);
+ }
return;
}