aboutsummaryrefslogtreecommitdiffstats
path: root/epan/dissectors/packet-smb-common.c
diff options
context:
space:
mode:
authorRonnie Sahlberg <ronnie_sahlberg@ozemail.com.au>2005-08-19 08:12:26 +0000
committerRonnie Sahlberg <ronnie_sahlberg@ozemail.com.au>2005-08-19 08:12:26 +0000
commit645863b8936d573f7a11febcd259ce02733f8bc1 (patch)
tree983ee25a33b4051a09c784c1c0a66e182fd07206 /epan/dissectors/packet-smb-common.c
parent1f7b1af63f346a69ef49d2e3826af3ce2a082790 (diff)
remove g_malloc() from packet-smb-common
svn path=/trunk/; revision=15420
Diffstat (limited to 'epan/dissectors/packet-smb-common.c')
-rw-r--r--epan/dissectors/packet-smb-common.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/epan/dissectors/packet-smb-common.c b/epan/dissectors/packet-smb-common.c
index 8042b01b11..bad99e3807 100644
--- a/epan/dissectors/packet-smb-common.c
+++ b/epan/dissectors/packet-smb-common.c
@@ -101,7 +101,7 @@ int display_unicode_string(tvbuff_t *tvb, proto_tree *tree, int offset, int hf_i
* Allocate a buffer for the string; "len" is the length in
* bytes, not the length in characters.
*/
- str = g_malloc(len/2);
+ str = ep_alloc(len/2);
/*
* XXX - this assumes the string is just ISO 8859-1; we need
@@ -121,8 +121,6 @@ int display_unicode_string(tvbuff_t *tvb, proto_tree *tree, int offset, int hf_i
if (data)
*data = str;
- else
- g_free(str);
return offset+len;
}