summaryrefslogtreecommitdiff
path: root/epan/dissectors/packet-rtmpt.c
diff options
context:
space:
mode:
authorBill Meier <wmeier@newsguy.com>2011-12-15 18:13:21 +0000
committerBill Meier <wmeier@newsguy.com>2011-12-15 18:13:21 +0000
commit8fe471e0c348f26de1629c4cef6b1ecae6d5977a (patch)
tree45eac584599041e2285465f91dad1c68c83887e1 /epan/dissectors/packet-rtmpt.c
parentb2678b43d1329ff7e330312c37bf004b453a9550 (diff)
downloadwireshark-8fe471e0c348f26de1629c4cef6b1ecae6d5977a.tar.gz
Fix some tvb memory leaks; Fix a typo.
svn path=/trunk/; revision=40211
Diffstat (limited to 'epan/dissectors/packet-rtmpt.c')
-rw-r--r--epan/dissectors/packet-rtmpt.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/epan/dissectors/packet-rtmpt.c b/epan/dissectors/packet-rtmpt.c
index f9eb5cb4ec..29a488c739 100644
--- a/epan/dissectors/packet-rtmpt.c
+++ b/epan/dissectors/packet-rtmpt.c
@@ -1319,7 +1319,7 @@ dissect_rtmpt_common(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, rtmpt_
while ((tp=ep_stack_pop(packets))!=NULL) {
if (tp->resident) {
- pktbuf = tvb_new_real_data(tp->data.p, tp->have, tp->have);
+ pktbuf = tvb_new_child_real_data(tvb, tp->data.p, tp->have, tp->have);
add_new_data_source(pinfo, pktbuf, "Unchunked RTMP");
} else {
pktbuf = tvb_new_subset(tvb, tp->data.offset, tp->have, tp->have);
@@ -1576,7 +1576,7 @@ dissect_rtmpt_common(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, rtmpt_
if (tp->have==tp->want) {
se_tree_insert32(rconv->packets[cdir], tp->lastseq, tp);
- pktbuf = tvb_new_real_data(tp->data.p, tp->have, tp->have);
+ pktbuf = tvb_new_child_real_data(tvb, tp->data.p, tp->have, tp->have);
add_new_data_source(pinfo, pktbuf, "Unchunked RTMP");
dissect_rtmpt(pktbuf, pinfo, tree, rconv, cdir, tp);
continue;
@@ -1628,7 +1628,7 @@ unchunk:
/* Whole packet is complete */
se_tree_insert32(rconv->packets[cdir], tp->lastseq, tp);
- pktbuf = tvb_new_real_data(tp->data.p, tp->have, tp->have);
+ pktbuf = tvb_new_child_real_data(tvb, tp->data.p, tp->have, tp->have);
add_new_data_source(pinfo, pktbuf, "Unchunked RTMP");
dissect_rtmpt(pktbuf, pinfo, tree, rconv, cdir, tp);
} else if (tp->chunkhave<tp->chunkwant) {
@@ -1818,7 +1818,7 @@ dissect_rtmpt_heur(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
conversation_t * conversation;
if (tvb_length(tvb) >= 12)
{
- /* To avoid a too high rate of false positive, this heurisitics only matches the protocol
+ /* To avoid a too high rate of false positive, this heuristics only matches the protocol
from the first server response packet and not from the client request packets before.
Therefore it is necessary to a "Decode as" to properly decode the first packets */
struct tcpinfo *tcpinfo = pinfo->private_data;