diff options
author | Guy Harris <guy@alum.mit.edu> | 2005-09-28 16:16:37 +0000 |
---|---|---|
committer | Guy Harris <guy@alum.mit.edu> | 2005-09-28 16:16:37 +0000 |
commit | f6ef22c553bea7cfbdc19460d3cc720470b1c7cd (patch) | |
tree | 4e08a5b99702220fe50cd42f9c05cf1228acae04 /epan/dissectors | |
parent | e2d774be167d2ff4d2759c5218b49def4ba7e265 (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.
svn path=/trunk/; revision=16039
Diffstat (limited to 'epan/dissectors')
-rw-r--r-- | epan/dissectors/ncp2222.py | 1 | ||||
-rw-r--r-- | epan/dissectors/packet-bssgp.c | 1 | ||||
-rw-r--r-- | epan/dissectors/packet-dcom.c | 1 | ||||
-rw-r--r-- | epan/dissectors/packet-esis.c | 1 | ||||
-rw-r--r-- | epan/dissectors/packet-frame.c | 4 | ||||
-rw-r--r-- | epan/dissectors/packet-frame.h | 2 | ||||
-rw-r--r-- | epan/dissectors/packet-gsm_sms_ud.c | 1 | ||||
-rw-r--r-- | epan/dissectors/packet-msdp.c | 1 | ||||
-rw-r--r-- | epan/dissectors/packet-pim.c | 1 | ||||
-rw-r--r-- | epan/dissectors/packet-ppp.c | 1 | ||||
-rw-r--r-- | epan/dissectors/packet-pppoe.c | 1 | ||||
-rw-r--r-- | epan/dissectors/packet-smb-pipe.c | 1 | ||||
-rw-r--r-- | epan/dissectors/packet-sna.c | 1 | ||||
-rw-r--r-- | epan/dissectors/packet-udp.c | 1 |
14 files changed, 14 insertions, 4 deletions
diff --git a/epan/dissectors/ncp2222.py b/epan/dissectors/ncp2222.py index 0b285e8544..76fc22179f 100644 --- a/epan/dissectors/ncp2222.py +++ b/epan/dissectors/ncp2222.py @@ -5560,6 +5560,7 @@ def produce_code(): #include <epan/packet.h> #include <epan/conversation.h> #include <epan/ptvcursor.h> +#include <epan/emem.h> #include "packet-ncp-int.h" #include "packet-ncp-nmas.h" #include <epan/strutil.h> diff --git a/epan/dissectors/packet-bssgp.c b/epan/dissectors/packet-bssgp.c index 7505215ccc..c0976e8356 100644 --- a/epan/dissectors/packet-bssgp.c +++ b/epan/dissectors/packet-bssgp.c @@ -35,6 +35,7 @@ #include <math.h> #include <glib.h> #include <epan/packet.h> +#include <epan/emem.h> #include <prefs.h> /*#define BSSGP_DEBUG*/ diff --git a/epan/dissectors/packet-dcom.c b/epan/dissectors/packet-dcom.c index 2272bebed6..70600ce40d 100644 --- a/epan/dissectors/packet-dcom.c +++ b/epan/dissectors/packet-dcom.c @@ -84,6 +84,7 @@ #include <glib.h> #include <epan/packet.h> +#include <epan/emem.h> #include "packet-dcerpc.h" #include "packet-dcom.h" #include "prefs.h" diff --git a/epan/dissectors/packet-esis.c b/epan/dissectors/packet-esis.c index b4f4c15d63..5e249ec5a0 100644 --- a/epan/dissectors/packet-esis.c +++ b/epan/dissectors/packet-esis.c @@ -32,6 +32,7 @@ #include <string.h> #include <glib.h> #include <epan/packet.h> +#include <epan/emem.h> #include <epan/nlpid.h> #include "packet-osi.h" #include "packet-osi-options.h" 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: diff --git a/epan/dissectors/packet-frame.h b/epan/dissectors/packet-frame.h index c604395486..1430fb1544 100644 --- a/epan/dissectors/packet-frame.h +++ b/epan/dissectors/packet-frame.h @@ -27,7 +27,7 @@ * Routine used to add an indication of an arbitrary exception to the 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); /* * Routine used to add an indication of a ReportedBoundsError exception diff --git a/epan/dissectors/packet-gsm_sms_ud.c b/epan/dissectors/packet-gsm_sms_ud.c index 138baa4b65..b36f588d96 100644 --- a/epan/dissectors/packet-gsm_sms_ud.c +++ b/epan/dissectors/packet-gsm_sms_ud.c @@ -70,6 +70,7 @@ #include <epan/packet.h> #include <epan/prefs.h> +#include <epan/emem.h> #include <epan/reassemble.h> static void dissect_gsm_sms_ud(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree); diff --git a/epan/dissectors/packet-msdp.c b/epan/dissectors/packet-msdp.c index 88838ca09e..83a4ea7f04 100644 --- a/epan/dissectors/packet-msdp.c +++ b/epan/dissectors/packet-msdp.c @@ -36,6 +36,7 @@ #include <glib.h> #include <epan/packet.h> +#include <epan/emem.h> /* MSDP message types. The messages are TLV (Type-Length-Value) encoded */ enum { MSDP_SA = 1, diff --git a/epan/dissectors/packet-pim.c b/epan/dissectors/packet-pim.c index 7e93e8e6e8..23f52f6b04 100644 --- a/epan/dissectors/packet-pim.c +++ b/epan/dissectors/packet-pim.c @@ -32,6 +32,7 @@ #include <glib.h> #include <epan/packet.h> +#include <epan/emem.h> #include <epan/ipproto.h> #include <epan/afn.h> #include "packet-ipv6.h" diff --git a/epan/dissectors/packet-ppp.c b/epan/dissectors/packet-ppp.c index bc9c1a317f..199f3b5eb1 100644 --- a/epan/dissectors/packet-ppp.c +++ b/epan/dissectors/packet-ppp.c @@ -33,6 +33,7 @@ #include <glib.h> #include <epan/prefs.h> #include <epan/packet.h> +#include <epan/emem.h> #include "packet-ppp.h" #include <epan/ppptypes.h> #include <epan/etypes.h> diff --git a/epan/dissectors/packet-pppoe.c b/epan/dissectors/packet-pppoe.c index 3b6870cc72..666cb5ec44 100644 --- a/epan/dissectors/packet-pppoe.c +++ b/epan/dissectors/packet-pppoe.c @@ -28,6 +28,7 @@ #include <glib.h> #include <epan/packet.h> +#include <epan/emem.h> #include <epan/strutil.h> #include <epan/etypes.h> diff --git a/epan/dissectors/packet-smb-pipe.c b/epan/dissectors/packet-smb-pipe.c index d7a3d36cf0..e1276d6482 100644 --- a/epan/dissectors/packet-smb-pipe.c +++ b/epan/dissectors/packet-smb-pipe.c @@ -42,6 +42,7 @@ XXX Fixme : shouldnt show [malformed frame] for long packets #include <glib.h> #include <ctype.h> #include <epan/packet.h> +#include <epan/emem.h> #include <epan/dissectors/packet-smb.h> #include "packet-smb-pipe.h" #include "packet-smb-browse.h" diff --git a/epan/dissectors/packet-sna.c b/epan/dissectors/packet-sna.c index f4a690d554..e340a9d5b9 100644 --- a/epan/dissectors/packet-sna.c +++ b/epan/dissectors/packet-sna.c @@ -30,6 +30,7 @@ #include <glib.h> #include <epan/packet.h> +#include <epan/emem.h> #include <epan/llcsaps.h> #include <epan/ppptypes.h> #include <epan/sna-utils.h> diff --git a/epan/dissectors/packet-udp.c b/epan/dissectors/packet-udp.c index 98be190a26..9b1569e04d 100644 --- a/epan/dissectors/packet-udp.c +++ b/epan/dissectors/packet-udp.c @@ -35,6 +35,7 @@ #include <glib.h> #include <epan/packet.h> +#include <epan/emem.h> #include <epan/addr_resolv.h> #include <epan/ipproto.h> #include <epan/in_cksum.h> |