There is a potential memory leak when init_by_defaults() function returns with error.
Fixed it with this patch
--- src/lib/ares_init.c.org 2024-02-23 08:23:02.000000000 +0100
+++ src/lib/ares_init.c 2024-03-12 16:10:13.107757585 +0100
@@ -262,12 +262,10 @@
error:
if (rc) {
- if (channel->domains && channel->domains[0]) {
-
ares_free(channel->domains[0]);
- }
if (channel->domains) {
-
ares_free(channel->domains);
-
ares__strsplit_free(channel->domains, channel->ndomains);
channel->domains = NULL;
-
}
There is a potential memory leak when init_by_defaults() function returns with error.
Fixed it with this patch
--- src/lib/ares_init.c.org 2024-02-23 08:23:02.000000000 +0100
+++ src/lib/ares_init.c 2024-03-12 16:10:13.107757585 +0100
@@ -262,12 +262,10 @@
error:
if (rc) {
if (channel->domains) {