Skip to content

Commit

Permalink
dnsproxy: Free gresolv on exit
Browse files Browse the repository at this point in the history
valgrind reported a leak in __connman_wpad_start(). Though the resolv
object will be reused and therefore valgrind is reported the wrong
leaker. dnsproxy happely allocates the resolver but never releases it.
  • Loading branch information
igaw authored and LaakkonenJussi committed Mar 12, 2021
1 parent 566716d commit fd81ce7
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions connman/src/dnsproxy.c
Expand Up @@ -4031,4 +4031,9 @@ void __connman_dnsproxy_cleanup(void)
g_hash_table_destroy(listener_table);

g_hash_table_destroy(partial_tcp_req_table);

if (ipv4_resolve)
g_resolv_unref(ipv4_resolve);
if (ipv6_resolve)
g_resolv_unref(ipv6_resolve);
}

0 comments on commit fd81ce7

Please sign in to comment.