abs_time_to_str() returns a staticly allocated string. dont g_free() it.
authorsahlberg <sahlberg@f5534014-38df-0310-8fa8-9805f1628bb7>
Tue, 21 Dec 2004 16:44:11 +0000 (16:44 +0000)
committersahlberg <sahlberg@f5534014-38df-0310-8fa8-9805f1628bb7>
Tue, 21 Dec 2004 16:44:11 +0000 (16:44 +0000)
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.

git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@12801 f5534014-38df-0310-8fa8-9805f1628bb7

epan/dissectors/packet-mmse.c

index 7a55215b3d5597bb070517e64ecd0172d92be926..87ddfadc8c3eeadfbe5a97765a22a56e02120ba5 100644 (file)
@@ -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
            }