diff options
author | Guy Harris <guy@alum.mit.edu> | 2005-01-07 10:44:44 +0000 |
---|---|---|
committer | Guy Harris <guy@alum.mit.edu> | 2005-01-07 10:44:44 +0000 |
commit | a41963720971cb1bc1eebc380e292cf0f6edd221 (patch) | |
tree | 152fa9eb0dfb7e9098f7d674e6c39f8490df9db2 /epan/dissectors/packet-srvloc.c | |
parent | 0667d869b22da7a244a785cbfad519f3340c683c (diff) |
From Chris Maynard: free strings fetched with "tvb_fake_unicode()" when
we're done with them.
svn path=/trunk/; revision=12974
Diffstat (limited to 'epan/dissectors/packet-srvloc.c')
-rw-r--r-- | epan/dissectors/packet-srvloc.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/epan/dissectors/packet-srvloc.c b/epan/dissectors/packet-srvloc.c index afe99bfdb3..7a5a0c1b62 100644 --- a/epan/dissectors/packet-srvloc.c +++ b/epan/dissectors/packet-srvloc.c @@ -480,6 +480,7 @@ attr_list(proto_tree *tree, int hf, tvbuff_t *tvb, int offset, int length, guint8 *byte_value; proto_item *ti; proto_tree *srvloc_tree; + guint8 *tmp; static const value_string srvloc_svc[] = { { 50, "TCP/UDP" }, @@ -504,9 +505,12 @@ attr_list(proto_tree *tree, int hf, tvbuff_t *tvb, int offset, int length, case CHARSET_ISO_10646_UCS_2: - type_len = strcspn(tvb_fake_unicode(tvb, offset, length/2, FALSE), "="); + tmp = tvb_fake_unicode(tvb, offset, length/2, FALSE); + type_len = strcspn(tmp, "="); + g_free(tmp); attr_type = tvb_fake_unicode(tvb, offset+2, type_len-1, FALSE); proto_tree_add_string(tree, hf, tvb, offset, type_len*2, attr_type); + g_free(attr_type); i=1; for (foffset = offset + ((type_len*2)+2); foffset<length; foffset += 2) { |