Use g_tree_steal to remove an entry without calling the destroy function.
authorstig <stig@f5534014-38df-0310-8fa8-9805f1628bb7>
Wed, 5 Oct 2011 11:44:19 +0000 (11:44 +0000)
committerstig <stig@f5534014-38df-0310-8fa8-9805f1628bb7>
Wed, 5 Oct 2011 11:44:19 +0000 (11:44 +0000)
This because we use the destroy function to determine same_name_hfinfo.

git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@39267 f5534014-38df-0310-8fa8-9805f1628bb7

epan/proto.c

index 64f6261e20b492c69f2a3131b86f34f83585d840..788a78bb7e8c5e16ed3c47d7072994ecd769db08 100644 (file)
@@ -4721,7 +4721,7 @@ proto_unregister_field (const int parent, gint hf_id)
                hf = field->data;
                if (*hf->p_id == hf_id) {
                        /* Found the hf_id in this protocol */
-                       g_tree_remove (gpa_name_tree, hf->hfinfo.abbrev);
+                       g_tree_steal (gpa_name_tree, hf->hfinfo.abbrev);
                        proto->fields = g_list_remove_link (proto->fields, field);
                        proto->last_field = g_list_last (proto->fields);
                        break;