diff options
author | Guy Harris <guy@alum.mit.edu> | 2005-08-06 19:58:45 +0000 |
---|---|---|
committer | Guy Harris <guy@alum.mit.edu> | 2005-08-06 19:58:45 +0000 |
commit | f618b54d368be8ee5b26c982f492d4132cda1f16 (patch) | |
tree | 4b2184339504000339e2cc5ef6405aa2320fc255 /epan/dissectors/packet-frame.c | |
parent | b003633f3bc22bf99d9c1afcddb3b27ecffc9b30 (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.c | 1 |
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: |