forked from osmocom/wireshark
ememify some more calls to tvb_get_string()
this fixes an obvious memleak in ms-mms svn path=/trunk/; revision=15132
This commit is contained in:
parent
0d7a2abbc7
commit
df2d1d3f22
|
@ -1082,7 +1082,7 @@ void cb_str_postprocess(packet_info *pinfo, proto_tree *tree _U_,
|
|||
* some way we can get that string, rather than duplicating the
|
||||
* efforts of that routine?
|
||||
*/
|
||||
s = tvb_get_string(
|
||||
s = ep_tvb_get_string(
|
||||
tvb, start_offset + 12, (end_offset - start_offset - 12) );
|
||||
|
||||
/* Append string to COL_INFO */
|
||||
|
@ -1118,8 +1118,6 @@ void cb_str_postprocess(packet_info *pinfo, proto_tree *tree _U_,
|
|||
|
||||
dcv->private_data = g_strdup(s);
|
||||
}
|
||||
|
||||
g_free(s);
|
||||
}
|
||||
|
||||
/* Dissect a pointer to a NDR string and append the string value to the
|
||||
|
|
|
@ -1328,7 +1328,7 @@ add_tagged_field (packet_info * pinfo, proto_tree * tree, tvbuff_t * tvb, int of
|
|||
{
|
||||
char *ssid;
|
||||
|
||||
ssid = tvb_get_string(tvb, offset + 2, tag_len);
|
||||
ssid = ep_tvb_get_string(tvb, offset + 2, tag_len);
|
||||
proto_tree_add_string (tree, tag_interpretation, tvb, offset + 2,
|
||||
tag_len, ssid);
|
||||
if (check_col (pinfo->cinfo, COL_INFO)) {
|
||||
|
@ -1345,7 +1345,6 @@ add_tagged_field (packet_info * pinfo, proto_tree * tree, tvbuff_t * tvb, int of
|
|||
} else {
|
||||
proto_item_append_text(ti, ": Broadcast");
|
||||
}
|
||||
g_free(ssid);
|
||||
beacon_padding++; /* padding bug */
|
||||
}
|
||||
break;
|
||||
|
|
|
@ -399,7 +399,7 @@ static gint dissect_msmms_command(tvbuff_t *tvb, packet_info *pinfo, proto_tree
|
|||
offset += 4;
|
||||
|
||||
/* Protocol name. Must be "MMS"... */
|
||||
if (strncmp(tvb_get_string(tvb, offset, 3), "MMS", 3) != 0)
|
||||
if (strncmp(ep_tvb_get_string(tvb, offset, 3), "MMS", 3) != 0)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
|
|
@ -559,11 +559,10 @@ process_body_part(proto_tree *tree, tvbuff_t *tvb, const guint8 *boundary,
|
|||
while (line_len > 0)
|
||||
{
|
||||
gint colon_offset;
|
||||
char *hdr_str = tvb_get_string(tvb, offset, next_offset - offset);
|
||||
char *hdr_str = ep_tvb_get_string(tvb, offset, next_offset - offset);
|
||||
char *header_str;
|
||||
|
||||
header_str = unfold_and_compact_mime_header(hdr_str, &colon_offset);
|
||||
g_free(hdr_str);
|
||||
if (colon_offset <= 0) {
|
||||
if (tree) {
|
||||
proto_tree_add_text(subtree, tvb, offset, next_offset - offset,
|
||||
|
|
Loading…
Reference in New Issue