diff options
Diffstat (limited to 'ui/qt/manage_interfaces_dialog.cpp')
-rw-r--r-- | ui/qt/manage_interfaces_dialog.cpp | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/ui/qt/manage_interfaces_dialog.cpp b/ui/qt/manage_interfaces_dialog.cpp index a660e936ad..f28affc72f 100644 --- a/ui/qt/manage_interfaces_dialog.cpp +++ b/ui/qt/manage_interfaces_dialog.cpp @@ -549,6 +549,7 @@ void ManageInterfacesDialog::addRemoteInterfaces(GList* rlist, remote_options *r caps = capture_get_if_capabilities(if_string, monitor_mode, NULL, main_window_update); for (; (curr_addr = g_slist_nth(if_info->addrs, ips)) != NULL; ips++) { address addr_str; + char* temp_addr_str = NULL; if (ips != 0) { g_string_append(ip_str, "\n"); } @@ -556,16 +557,19 @@ void ManageInterfacesDialog::addRemoteInterfaces(GList* rlist, remote_options *r switch (addr->ifat_type) { case IF_AT_IPv4: SET_ADDRESS(&addr_str, AT_IPv4, 4, &addr->addr.ip4_addr); - g_string_append(ip_str, ep_address_to_str(&addr_str)); + temp_addr_str = (char*)address_to_str(NULL, &addr_str); + g_string_append(ip_str, temp_addr_str); break; case IF_AT_IPv6: SET_ADDRESS(&addr_str, AT_IPv6, 16, addr->addr.ip6_addr); - g_string_append(ip_str, ep_address_to_str(&addr_str)); + temp_addr_str = (char*)address_to_str(NULL, &addr_str); + g_string_append(ip_str, temp_addr_str); break; default: /* In case we add non-IP addresses */ break; } + wmem_free(NULL, temp_addr_str); } /* for curr_addr */ linktype_count = 0; device.links = NULL; |