aboutsummaryrefslogtreecommitdiffstats
path: root/epan/dissectors/packet-frame.c
diff options
context:
space:
mode:
authorGuy Harris <guy@alum.mit.edu>2005-08-06 19:58:45 +0000
committerGuy Harris <guy@alum.mit.edu>2005-08-06 19:58:45 +0000
commitf618b54d368be8ee5b26c982f492d4132cda1f16 (patch)
tree4b2184339504000339e2cc5ef6405aa2320fc255 /epan/dissectors/packet-frame.c
parentb003633f3bc22bf99d9c1afcddb3b27ecffc9b30 (diff)
Support throwing an exception with a null message pointer, and have the
message not be const (as we generate messages with "g_strdup_sprintf()", which means they need to be freed; using a null message means that we don't have to use a special string for exceptions with no message, and don't have to worry about not freeing that). Have THROW() throw an exception with a null message pointer. (This means that you crash if you throw DissectorError with THROW(). Don't do that - it means you don't get a more detailed explanation of the dissector problem. Use the DISSECTOR_ASSERT, etc. macros in epan/proto.h instead.) Free the exception message for DissectorError, as it's mallocated. svn path=/trunk/; revision=15250
Diffstat (limited to 'epan/dissectors/packet-frame.c')
-rw-r--r--epan/dissectors/packet-frame.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/epan/dissectors/packet-frame.c b/epan/dissectors/packet-frame.c
index ba98cfde20..d9b607732d 100644
--- a/epan/dissectors/packet-frame.c
+++ b/epan/dissectors/packet-frame.c
@@ -288,6 +288,7 @@ show_exception(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree,
pinfo->current_proto, exception_message);
g_warning("Dissector bug, protocol %s, in packet %u: %s",
pinfo->current_proto, pinfo->fd->num, exception_message);
+ g_free(exception_message);
break;
default: