aboutsummaryrefslogtreecommitdiffstats
path: root/epan/dissectors/packet-dcerpc.c
diff options
context:
space:
mode:
authorJakub Zawadzki <darkjames-ws@darkjames.pl>2012-07-26 17:26:05 +0000
committerJakub Zawadzki <darkjames-ws@darkjames.pl>2012-07-26 17:26:05 +0000
commit835a1a1b9ca9b4deaff07be74c6acd5d84b30e26 (patch)
tree84ba7b119d9f57bfbd786235d971b617365c5a21 /epan/dissectors/packet-dcerpc.c
parent80721f54980b3b769f46b1fb5836876b28d25417 (diff)
Fix memleaks (tvb_get_unicode_string())
svn path=/trunk/; revision=44053
Diffstat (limited to 'epan/dissectors/packet-dcerpc.c')
-rw-r--r--epan/dissectors/packet-dcerpc.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/epan/dissectors/packet-dcerpc.c b/epan/dissectors/packet-dcerpc.c
index d0fb38e1cc..9947326902 100644
--- a/epan/dissectors/packet-dcerpc.c
+++ b/epan/dissectors/packet-dcerpc.c
@@ -1560,8 +1560,7 @@ dissect_ndr_cvstring(tvbuff_t *tvb, int offset, packet_info *pinfo,
proto_tree_add_item() with the appropriate ENC_ value? */
/* XXX - should this ever be used with something that's *not*
an FT_STRING? */
- s = tvb_get_unicode_string(tvb, offset, buffer_len, ENC_LITTLE_ENDIAN);
-
+ s = tvb_get_ephemeral_unicode_string(tvb, offset, buffer_len, ENC_LITTLE_ENDIAN);
if (tree && buffer_len) {
hfinfo = proto_registrar_get_nth(hfindex);
tvb_ensure_bytes_exist(tvb, offset, buffer_len);
@@ -1573,6 +1572,7 @@ dissect_ndr_cvstring(tvbuff_t *tvb, int offset, packet_info *pinfo,
buffer_len, DREP_ENC_INTEGER(drep));
}
}
+
} else {
/*
* "tvb_get_ephemeral_string()" throws an exception if the entire string
@@ -1750,8 +1750,7 @@ dissect_ndr_vstring(tvbuff_t *tvb, int offset, packet_info *pinfo,
proto_tree_add_item() with the appropriate ENC_ value? */
/* XXX - should this ever be used with something that's *not*
an FT_STRING? */
- s = tvb_get_unicode_string(tvb, offset, buffer_len, ENC_LITTLE_ENDIAN);
-
+ s = tvb_get_ephemeral_unicode_string(tvb, offset, buffer_len, ENC_LITTLE_ENDIAN);
if (tree && buffer_len) {
hfinfo = proto_registrar_get_nth(hfindex);
tvb_ensure_bytes_exist(tvb, offset, buffer_len);
@@ -1763,6 +1762,7 @@ dissect_ndr_vstring(tvbuff_t *tvb, int offset, packet_info *pinfo,
buffer_len, DREP_ENC_INTEGER(drep));
}
}
+
} else {
/*
* "tvb_get_ephemeral_string()" throws an exception if the entire string