From Chris Maynard: don't extract strings with "tvb_get_string()" if
we're not going to use them, and free them when we're done with them. Clean up white space. svn path=/trunk/; revision=12963
This commit is contained in:
parent
45d7435bd3
commit
77762e2ddc
|
@ -879,10 +879,12 @@ dissect_sdp_media(tvbuff_t *tvb, proto_item *ti,
|
|||
tokenlen = next_offset - offset;
|
||||
}
|
||||
|
||||
if (strcmp(transport_info->media_proto[transport_info->media_count],
|
||||
"RTP/AVP") == 0) {
|
||||
media_format = tvb_get_string(tvb, offset, tokenlen);
|
||||
if (!strcmp(transport_info->media_proto[transport_info->media_count], "RTP/AVP")) {
|
||||
proto_tree_add_string(sdp_media_tree, hf_media_format, tvb,
|
||||
offset, tokenlen, val_to_str(atol(media_format), rtp_payload_type_vals, "%u"));
|
||||
proto_tree_add_string(sdp_media_tree, hf_media_format, tvb, offset,
|
||||
tokenlen, val_to_str(atol(media_format), rtp_payload_type_vals, "%u"));
|
||||
g_free(media_format);
|
||||
} else {
|
||||
proto_tree_add_item(sdp_media_tree, hf_media_format, tvb,
|
||||
offset, tokenlen, FALSE);
|
||||
|
|
Loading…
Reference in New Issue