From ef929dc8eb8c61d5829132d2da2a3061df44bba9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jo=C3=A3o=20Valverde?= Date: Mon, 8 Feb 2016 00:43:56 +0000 Subject: Revert "Add free_address_wmem() and other extensions to address API" MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This reverts commit 13ec77a9fc3af3b0b502820d0b55796c89997896. This commit introduces a segmentation fault for Lua code (uncovered by the test suite). Change-Id: Ibc273d1915cda9632697b9f138f0ae104d3fb65e Reviewed-on: https://code.wireshark.org/review/13813 Reviewed-by: João Valverde --- epan/conversation_table.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'epan/conversation_table.c') diff --git a/epan/conversation_table.c b/epan/conversation_table.c index 12b9418663..1aaeabc4b3 100644 --- a/epan/conversation_table.c +++ b/epan/conversation_table.c @@ -285,8 +285,8 @@ reset_conversation_table_data(conv_hash_t *ch) guint i; for(i = 0; i < ch->conv_array->len; i++){ conv_item_t *conv = &g_array_index(ch->conv_array, conv_item_t, i); - free_address(&conv->src_address); - free_address(&conv->dst_address); + g_free((gpointer)conv->src_address.data); + g_free((gpointer)conv->dst_address.data); } g_array_free(ch->conv_array, TRUE); @@ -310,7 +310,7 @@ void reset_hostlist_table_data(conv_hash_t *ch) guint i; for(i = 0; i < ch->conv_array->len; i++){ hostlist_talker_t *host = &g_array_index(ch->conv_array, hostlist_talker_t, i); - free_address(&host->myaddress); + g_free((gpointer)host->myaddress.data); } g_array_free(ch->conv_array, TRUE); @@ -769,7 +769,7 @@ add_hostlist_table_data(conv_hash_t *ch, const address *addr, guint32 port, gboo host_key_t existing_key; gpointer talker_idx_hash_val; - copy_address_shallow(&existing_key.myaddress, addr); + existing_key.myaddress = *addr; existing_key.port = port; if (g_hash_table_lookup_extended(ch->hashtable, &existing_key, NULL, &talker_idx_hash_val)) { -- cgit v1.2.1