From 28ba56667599c7a90c8492052b438f58aa963902 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Stig=20Bj=C3=B8rlykke?= Date: Fri, 15 Dec 2017 21:38:30 +0100 Subject: wslua: Fix memory leakages MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Free some variables in error handling. Change-Id: I0d0653962b11f760c31872aa7e5b5f1d20c54dcb Reviewed-on: https://code.wireshark.org/review/24842 Petri-Dish: Stig Bjørlykke Tested-by: Petri Dish Buildbot Reviewed-by: Michael Mann --- epan/wslua/wslua_listener.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'epan/wslua/wslua_listener.c') diff --git a/epan/wslua/wslua_listener.c b/epan/wslua/wslua_listener.c index 0110774029..dd60ab3a92 100644 --- a/epan/wslua/wslua_listener.c +++ b/epan/wslua/wslua_listener.c @@ -240,7 +240,7 @@ WSLUA_CONSTRUCTOR Listener_new(lua_State* L) { /* WSLUA_ERROR(new_tap,"tap registration error"); */ lua_pushfstring(L,"Error while registering tap:\n%s",error->str); g_string_free(error,TRUE); - luaL_error(L,lua_tostring(L,-1)); + return luaL_error(L,lua_tostring(L,-1)); } if (all_fields) { -- cgit v1.2.3