diff options
author | Hadriel Kaplan <hadrielk@yahoo.com> | 2014-02-26 23:42:15 -0500 |
---|---|---|
committer | Gerald Combs <gerald@wireshark.org> | 2014-02-27 21:23:09 +0000 |
commit | c826191be02132251a9bd7cdaa44647b24bfce95 (patch) | |
tree | 61acb2aad3b0243f22abe3084564a34161891635 /epan/wslua/wslua_listener.c | |
parent | c875dc8597a6ff3a513cd6b8397626c331564f5e (diff) |
Fix coverity warnings for all wslua files. (redux)
This fixes/addresses all the coverity warnings shown by
the buildbots. (I hope)
Change-Id: Ic2722df97c577d274e3cf3f0cbdca1902edde047
Reviewed-on: https://code.wireshark.org/review/423
Reviewed-by: Gerald Combs <gerald@wireshark.org>
Diffstat (limited to 'epan/wslua/wslua_listener.c')
-rw-r--r-- | epan/wslua/wslua_listener.c | 5 |
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) { |