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, 3 insertions, 2 deletions
diff --git a/epan/wslua/wslua_listener.c b/epan/wslua/wslua_listener.c
index 14438631e2..238fc8ecab 100644
--- a/epan/wslua/wslua_listener.c
+++ b/epan/wslua/wslua_listener.c
@@ -225,8 +225,9 @@ WSLUA_CONSTRUCTOR Listener_new(lua_State* L) {
g_free(tap->name);
g_free(tap);
/* WSLUA_ERROR(new_tap,"tap registration error"); */
- luaL_error(L,"Error while registering tap:\n%s",error->str);
- g_string_free(error,TRUE); /* XXX LEAK? */
+ lua_pushfstring(L,"Error while registering tap:\n%s",error->str);
+ g_string_free(error,TRUE);
+ luaL_error(L,lua_tostring(L,-1));
}
if (all_fields) {