aboutsummaryrefslogtreecommitdiffstats
path: root/epan/proto.c
diff options
context:
space:
mode:
authorguy <guy@f5534014-38df-0310-8fa8-9805f1628bb7>2005-09-28 16:16:37 +0000
committerguy <guy@f5534014-38df-0310-8fa8-9805f1628bb7>2005-09-28 16:16:37 +0000
commit7a2170d9b68e2e744383a44297a4b20af160bc76 (patch)
tree4e08a5b99702220fe50cd42f9c05cf1228acae04 /epan/proto.c
parentb7cf801eb1e9c815b8f958a9c2d5485e404e7797 (diff)
Have show_exception() take a "const char *" as its exception message,
and not free the string to which it points. Pass to REPORT_DISSECTOR_BUG() strings allocated with ep_strdup_printf(), so that they're freed automatically. git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@16039 f5534014-38df-0310-8fa8-9805f1628bb7
Diffstat (limited to 'epan/proto.c')
-rw-r--r--epan/proto.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/epan/proto.c b/epan/proto.c
index 851e6b623f..3ed1e0afc3 100644
--- a/epan/proto.c
+++ b/epan/proto.c
@@ -2142,10 +2142,10 @@ proto_tree_add_node(proto_tree *tree, field_info *fi)
tnode = tree;
tfi = tnode->finfo;
if (tfi != NULL && (tfi->tree_type < 0 || tfi->tree_type >= num_tree_types)) {
- REPORT_DISSECTOR_BUG(g_strdup_printf("\"%s\" - \"%s\" tfi->tree_type: %u invalid (%s:%u)",
+ REPORT_DISSECTOR_BUG(ep_strdup_printf("\"%s\" - \"%s\" tfi->tree_type: %u invalid (%s:%u)",
fi->hfinfo->name, fi->hfinfo->abbrev, tfi->tree_type, __FILE__, __LINE__));
- /* XXX - is it safe to continue here? */
- }
+ /* XXX - is it safe to continue here? */
+ }
DISSECTOR_ASSERT(tfi == NULL ||
(tfi->tree_type >= 0 && tfi->tree_type < num_tree_types));