changeset 30482:3e7441e05be3

protocol is the *value*, not the *key*. Thus, we really shouldn't be attempting to remove it from the hash table. Especially because we just removed the corresponding key, thus invalidating this pointer. Fixes #12387.
author Elliott Sales de Andrade <qulogic@pidgin.im>
date Fri, 03 Sep 2010 07:24:29 +0000
parents d0965a30216a
children 1aa5e2934ef0
files libpurple/network.c
diffstat 1 files changed, 0 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/libpurple/network.c	Wed Sep 01 21:54:19 2010 +0000
+++ b/libpurple/network.c	Fri Sep 03 07:24:29 2010 +0000
@@ -1077,12 +1077,10 @@
 
 	if (protocol) {
 		purple_network_upnp_mapping_remove(&port, protocol, NULL);
-		g_hash_table_remove(upnp_port_mappings, protocol);
 	} else {
 		protocol = g_hash_table_lookup(nat_pmp_port_mappings, &port);
 		if (protocol) {
 			purple_network_nat_pmp_mapping_remove(&port, protocol, NULL);
-			g_hash_table_remove(nat_pmp_port_mappings, protocol);
 		}
 	}
 }