From cba7da7b6c886ed96560cf2fd0e6a929a6b579e7 Mon Sep 17 00:00:00 2001 From: Ronnie Sahlberg Date: Tue, 21 Dec 2004 16:44:11 +0000 Subject: abs_time_to_str() returns a staticly allocated string. dont g_free() it. fix two instances of wrong parameter list to proto_tree_add_string_format() if we call proto_tree_string() the hf field has to be of a string format as well. now it dissects christophe's capture without dumping core but it looks weird. mmse and telco people can read the specs and find ut what it wrong. svn path=/trunk/; revision=12801 --- epan/dissectors/packet-mmse.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'epan/dissectors/packet-mmse.c') diff --git a/epan/dissectors/packet-mmse.c b/epan/dissectors/packet-mmse.c index 7a55215b3d..87ddfadc8c 100644 --- a/epan/dissectors/packet-mmse.c +++ b/epan/dissectors/packet-mmse.c @@ -1171,7 +1171,7 @@ dissect_mmse(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, guint8 pdut, ti = proto_tree_add_string_format(tree, hf_mmse_prev_sent_by, tvb, offset - 1, 1 + count + length, - "%s (Forwarded-count=%u)", + strval, "%s (Forwarded-count=%u)", strval, fwd_count); subtree = proto_item_add_subtree(ti, ett_mmse_hdr_details); @@ -1207,7 +1207,7 @@ dissect_mmse(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, guint8 pdut, ti = proto_tree_add_string_format(tree, hf_mmse_prev_sent_date, tvb, offset - 1, 1 + count + length, - "%s (Forwarded-count=%u)", + strval, "%s (Forwarded-count=%u)", strval, fwd_count); subtree = proto_item_add_subtree(ti, ett_mmse_hdr_details); @@ -1217,7 +1217,6 @@ dissect_mmse(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, guint8 pdut, proto_tree_add_string(subtree, hf_mmse_prev_sent_date_date, tvb, offset + count + count1, count2, strval); - g_free(strval); } offset += length + count; break; @@ -1622,7 +1621,7 @@ proto_register_mmse(void) }, { &hf_mmse_prev_sent_date_date, { "Date", "mmse.previously_sent_date.date", - FT_ABSOLUTE_TIME, BASE_NONE, NULL, 0x00, + FT_STRING, BASE_NONE, NULL, 0x00, "Time when the MM has been previously sent.", HFILL } -- cgit v1.2.3