aboutsummaryrefslogtreecommitdiffstats
path: root/epan/dissectors/packet-frame.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/dissectors/packet-frame.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/dissectors/packet-frame.c')
-rw-r--r--epan/dissectors/packet-frame.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/epan/dissectors/packet-frame.c b/epan/dissectors/packet-frame.c
index c91ff5519d..74a8769c54 100644
--- a/epan/dissectors/packet-frame.c
+++ b/epan/dissectors/packet-frame.c
@@ -261,7 +261,7 @@ dissect_frame(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent_tree)
void
show_exception(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree,
- unsigned long exception, char *exception_message)
+ unsigned long exception, const char *exception_message)
{
static const char dissector_error_nomsg[] =
"Dissector writer didn't bother saying what the error was";
@@ -306,8 +306,6 @@ show_exception(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree,
"%s",
exception_message == NULL ?
dissector_error_nomsg : exception_message);
- if (exception_message != NULL)
- g_free(exception_message);
break;
default: