]> git.ipfire.org Git - thirdparty/mtr.git/commitdiff
freeaddrinfo
authorAaron Lipinski <aaron.lipinski@roboticsplus.co.nz>
Wed, 7 Apr 2021 01:08:36 +0000 (13:08 +1200)
committerAaron Lipinski <aaron.lipinski@roboticsplus.co.nz>
Thu, 8 Apr 2021 20:36:25 +0000 (08:36 +1200)
ui/gtk.c
ui/mtr.c

index 6e3a376e732b20f554f9f70ccbaf151cb1df5f31..8ad0bbdbb4948cb04d38f83b6b2a7e8313034ca1 100644 (file)
--- a/ui/gtk.c
+++ b/ui/gtk.c
@@ -250,6 +250,7 @@ static gint Host_activate(
     ctl->Hostname = gtk_entry_get_text(GTK_ENTRY(entry));
     if (get_hostent_from_name(ctl, &res, ctl->Hostname) == 0) {
         net_reopen(ctl, res);
+        freeaddrinfo(res);
         net_send_batch(ctl);
         /* If we are "Paused" at this point it is usually because someone
            entered a non-existing host. Therefore do the go-ahead... */
index 23411cb2fce5e635edd16dc0e44633781c064549..95867808147362fc6d0150c87ce3fe78c9386856 100644 (file)
--- a/ui/mtr.c
+++ b/ui/mtr.c
@@ -815,6 +815,8 @@ int main(
             }
         }
 
+        freeaddrinfo(res);
+
         lock(stdout);
         dns_open();
         display_open(&ctl);