aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGuy Harris <guy@alum.mit.edu>2004-01-19 23:48:05 +0000
committerGuy Harris <guy@alum.mit.edu>2004-01-19 23:48:05 +0000
commitfc7bbdd8d52eaf595c678f140b4856172298ed95 (patch)
tree398e0ad33b5f458e4fe0b70f0e596662dac6c2c6
parente28a53d40263160677d92a780034a5d4be30b17d (diff)
Free "media_type_str" once we've made the lower-cased copy - and refer
only to the lower-cased copy in subsequent code. svn path=/trunk/; revision=9744
-rw-r--r--packet-sip.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/packet-sip.c b/packet-sip.c
index c8a87f9078..2ad0437adf 100644
--- a/packet-sip.c
+++ b/packet-sip.c
@@ -18,7 +18,7 @@
* Copyright 2000, Heikki Vatiainen <hessu@cs.tut.fi>
* Copyright 2001, Jean-Francois Mule <jfm@cablelabs.com>
*
- * $Id: packet-sip.c,v 1.56 2004/01/19 23:08:02 obiot Exp $
+ * $Id: packet-sip.c,v 1.57 2004/01/19 23:48:05 guy Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
@@ -708,7 +708,7 @@ dissect_sip_common(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree,
#else
media_type_str_lower_case = g_ascii_strdown(media_type_str, -1);
#endif
- /* Please do NOT g_free(media_type_str) here */
+ g_free(media_type_str);
break;
case POS_CONTACT :
@@ -749,14 +749,13 @@ dissect_sip_common(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree,
/* give the content type parameters to sub dissectors */
- if ( media_type_str != NULL ) {
+ if ( media_type_str_lower_case != NULL ) {
void *save_private_data = pinfo->private_data;
pinfo->private_data = content_type_parameter_str;
found_match = dissector_try_string(media_type_dissector_table,
media_type_str_lower_case,
next_tvb, pinfo,
message_body_tree);
- g_free(media_type_str);
g_free(media_type_str_lower_case);
g_free(content_type_parameter_str);
pinfo->private_data = save_private_data;