aboutsummaryrefslogtreecommitdiffstats
path: root/epan/wslua/wslua_listener.c
diff options
context:
space:
mode:
Diffstat (limited to 'epan/wslua/wslua_listener.c')
-rw-r--r--epan/wslua/wslua_listener.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/epan/wslua/wslua_listener.c b/epan/wslua/wslua_listener.c
index 3f7767d347..c7feb6595e 100644
--- a/epan/wslua/wslua_listener.c
+++ b/epan/wslua/wslua_listener.c
@@ -103,10 +103,7 @@ static int lua_tap_packet(void *tapdata, packet_info *pinfo, epan_dissect_t *edt
lua_pinfo = pinfo;
lua_tvb = edt->tvb;
- lua_tree = (struct _wslua_treeitem *)g_malloc(sizeof(struct _wslua_treeitem));
- lua_tree->tree = edt->tree;
- lua_tree->item = NULL;
- lua_tree->expired = FALSE;
+ lua_tree = create_TreeItem(edt->tree, NULL);
switch ( lua_pcall(tap->L,3,1,1) ) {
case 0: