summaryrefslogtreecommitdiff
path: root/epan/dissectors/packet-pgm.c
diff options
context:
space:
mode:
authorChris Maynard <Christopher.Maynard@GTECH.COM>2013-12-19 17:48:11 +0000
committerChris Maynard <Christopher.Maynard@GTECH.COM>2013-12-19 17:48:11 +0000
commit725d85f0020569ac4f80b68b3f0f485cdde30739 (patch)
tree496772591cc608c5b8fe60df484fbfd7cbe04ded /epan/dissectors/packet-pgm.c
parentf756c9b2c4648478f32e02d88a1041d2960e6b72 (diff)
downloadwireshark-725d85f0020569ac4f80b68b3f0f485cdde30739.tar.gz
Fix leaks where ptvcursor_free() wasn't being called.
svn path=/trunk/; revision=54255
Diffstat (limited to 'epan/dissectors/packet-pgm.c')
-rw-r--r--epan/dissectors/packet-pgm.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/epan/dissectors/packet-pgm.c b/epan/dissectors/packet-pgm.c
index f0e0936c7e..63ba6247a7 100644
--- a/epan/dissectors/packet-pgm.c
+++ b/epan/dissectors/packet-pgm.c
@@ -974,6 +974,7 @@ dissect_pgm(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
default:
proto_tree_add_text(type_tree, tvb, ptvcursor_current_offset(cursor), -1,
"Can't handle this address format");
+ ptvcursor_free(cursor);
return;
}
break;
@@ -1027,6 +1028,7 @@ dissect_pgm(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
default:
proto_tree_add_text(type_tree, tvb, ptvcursor_current_offset(cursor), -1,
"Can't handle this address format");
+ ptvcursor_free(cursor);
return;
}
break;
@@ -1082,6 +1084,8 @@ dissect_pgm(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
if (isdata)
decode_pgm_ports(tvb, ptvcursor_current_offset(cursor), pinfo, tree, pgmhdr_sport, pgmhdr_dport);
+
+ ptvcursor_free(cursor);
}
}