aboutsummaryrefslogtreecommitdiffstats
path: root/epan/dissectors/packet-afs.c
diff options
context:
space:
mode:
Diffstat (limited to 'epan/dissectors/packet-afs.c')
-rw-r--r--epan/dissectors/packet-afs.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/epan/dissectors/packet-afs.c b/epan/dissectors/packet-afs.c
index f61531b54e..bf7584107a 100644
--- a/epan/dissectors/packet-afs.c
+++ b/epan/dissectors/packet-afs.c
@@ -420,12 +420,11 @@ static gint ett_afs_vldb_flags = -1;
offset += 4; \
p = tvb_get_ptr(tvb,offset,i); \
len = ((i+4-1)/4)*4; \
- tmp = g_malloc(i+1); \
+ tmp = ep_malloc(i+1); \
memcpy(tmp, p, i); \
tmp[i] = '\0'; \
proto_tree_add_string(tree, field, tvb, offset-4, len+4, \
(void *)tmp); \
- g_free(tmp); \
offset += len; \
}