From e20f5cc3a49035f7b422f62fdbaad12dc123094a Mon Sep 17 00:00:00 2001 From: Mikael Magnusson Date: Fri, 11 Jun 2021 00:20:32 +0200 Subject: WIP: cares --- src/sock.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/sock.c') diff --git a/src/sock.c b/src/sock.c index 6abc70b..cefafd9 100644 --- a/src/sock.c +++ b/src/sock.c @@ -68,11 +68,11 @@ static ares_channel setup_resolver (const char *bind_to, const char *bind_to_alt } if (!val) { - htab_insert(resolvers, bind_to, tmp_val); + htab_insert(resolvers, strdup(bind_to), tmp_val); } if (!val_alt && bind_to_alt) { - htab_insert(resolvers, bind_to_alt, tmp_val); + htab_insert(resolvers, strdup(bind_to_alt), tmp_val); } if (val && val_alt && val->p != val_alt->p) { -- cgit v1.2.3