utils: free the correct addrinfo
authorFelix Fietkau <nbd@nbd.name>
Tue, 2 Aug 2022 18:58:43 +0000 (20:58 +0200)
committerFelix Fietkau <nbd@nbd.name>
Tue, 2 Aug 2022 18:59:47 +0000 (20:59 +0200)
Signed-off-by: Felix Fietkau <nbd@nbd.name>
utils.c

diff --git a/utils.c b/utils.c
index ccbc6ed828d6e437597238063fa1a8f94b6235d2..0aa826c9709c69e8278976af9f73cc68636df5e6 100644 (file)
--- a/utils.c
+++ b/utils.c
@@ -68,7 +68,7 @@ found:
        ret = 0;
 
 free_ai:
-       freeaddrinfo(ai_cur);
+       freeaddrinfo(ai);
 
 out:
        free(buf);