aboutsummaryrefslogtreecommitdiffstats
path: root/epan/dissectors/packet-aim.c
diff options
context:
space:
mode:
authorRonnie Sahlberg <ronnie_sahlberg@ozemail.com.au>2005-07-24 02:43:41 +0000
committerRonnie Sahlberg <ronnie_sahlberg@ozemail.com.au>2005-07-24 02:43:41 +0000
commit835df3a1d2aef34df8468ce3046ad1c90333d7a0 (patch)
treed22834fc143b9ed887fac9996a48a5849e57454a /epan/dissectors/packet-aim.c
parent910f98eb86c4662c25a66106f502395f18304a83 (diff)
convert some uses of tvb_get_string() to ep_tvb_get_string()
there was at least one obvious memleak in one of the uses of tvb_get_string() svn path=/trunk/; revision=15027
Diffstat (limited to 'epan/dissectors/packet-aim.c')
-rw-r--r--epan/dissectors/packet-aim.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/epan/dissectors/packet-aim.c b/epan/dissectors/packet-aim.c
index 9b587cbf93..fe2857874a 100644
--- a/epan/dissectors/packet-aim.c
+++ b/epan/dissectors/packet-aim.c
@@ -1114,9 +1114,8 @@ int dissect_aim_tlv_value_string (proto_item *ti, guint16 valueid _U_, tvbuff_t
gint string_len;
string_len = tvb_length(tvb);
- buf = tvb_get_string(tvb, 0, string_len);
+ buf = ep_tvb_get_string(tvb, 0, string_len);
proto_item_set_text(ti, "Value: %s", format_text(buf, string_len));
- g_free(buf);
return string_len;
}
@@ -1205,14 +1204,13 @@ int dissect_aim_tlv_value_messageblock (proto_item *ti, guint16 valueid _U_, tvb
offset += 2;
/* The actual message */
- buf = tvb_get_string(tvb, offset, blocklen - 4 );
+ buf = ep_tvb_get_string(tvb, offset, blocklen - 4 );
proto_item_set_text(ti, "Message: %s",
format_text(buf, blocklen - 4));
proto_tree_add_item(entry, hf_aim_messageblock_message, tvb, offset,
blocklen-4,
FALSE);
offset += tvb_length_remaining(tvb, offset);
- g_free(buf);
}
return offset;