summaryrefslogtreecommitdiff
path: root/ui/gtk/hostlist_table.c
diff options
context:
space:
mode:
authorMichael Mann <mmann78@netscape.net>2015-01-17 20:34:35 -0500
committerMichael Mann <mmann78@netscape.net>2015-01-18 04:14:03 +0000
commit403be722cee0aa78b6c57b7e61c35d2d59780713 (patch)
treed7798c6683f95a6a6e0a8cb952f4b3165293c17c /ui/gtk/hostlist_table.c
parent86726f404a60003585d6a5f64f908b091bcac099 (diff)
downloadwireshark-403be722cee0aa78b6c57b7e61c35d2d59780713.tar.gz
Remove emem from GeoIP
Change-Id: Ifa96dc38a277b86c28f762489251dcc595afae67 Reviewed-on: https://code.wireshark.org/review/6603 Reviewed-by: Michael Mann <mmann78@netscape.net>
Diffstat (limited to 'ui/gtk/hostlist_table.c')
-rw-r--r--ui/gtk/hostlist_table.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/ui/gtk/hostlist_table.c b/ui/gtk/hostlist_table.c
index 8db01f30ce..7913acc108 100644
--- a/ui/gtk/hostlist_table.c
+++ b/ui/gtk/hostlist_table.c
@@ -585,14 +585,16 @@ draw_hostlist_table_data(hostlist_table *hl)
/* Filled in from the GeoIP config, if any */
for (j = 0; j < ENDP_NUM_GEOIP_COLUMNS; j++) {
if (host->myaddress.type == AT_IPv4 && j < geoip_db_num_dbs()) {
- const guchar *name = geoip_db_lookup_ipv4(j, pntoh32(host->myaddress.data), "-");
+ guchar *name = geoip_db_lookup_ipv4(j, pntoh32(host->myaddress.data), "-");
geoip[j] = g_strdup(name);
+ wmem_free(NULL, name);
} else if (host->myaddress.type == AT_IPv6 && j < geoip_db_num_dbs()) {
- const guchar *name;
+ guchar *name;
const struct e_in6_addr *addr = (const struct e_in6_addr *) host->myaddress.data;
name = geoip_db_lookup_ipv6(j, *addr, "-");
geoip[j] = g_strdup(name);
+ wmem_free(NULL, name);
} else {
geoip[j] = NULL;
}