mirror of
https://github.com/systemd/systemd-stable.git
synced 2025-02-18 17:57:27 +03:00
resolve: fix possible memleak
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.
This commit is contained in:
parent
73bfd7be04
commit
fe8c5ce615
@ -791,8 +791,10 @@ static void dns_stub_query_complete(DnsQuery *q) {
|
||||
* 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;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user