aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBalint Reczey <balint@balintreczey.hu>2015-06-04 19:30:35 +0200
committerAlexis La Goutte <alexis.lagoutte@gmail.com>2015-06-09 04:18:48 +0000
commite187b5396eee802fb2319f199fc3f6986189b15f (patch)
tree3d3c12dfdc01255f16c4898d8e9a8d6691b50cad
parent41ac67cbb218d9d7da4bd7d767b12c03a0096b5b (diff)
Don't try to clean up uninitialized Lua and crash
Reported to Debian BTS at: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=786704 Change-Id: I3045a68f0dd557bf64ea26a488a1bcece4828fec Reviewed-on: https://code.wireshark.org/review/8765 Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com> Petri-Dish: Alexis La Goutte <alexis.lagoutte@gmail.com> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Balint Reczey <balint@balintreczey.hu>
-rw-r--r--epan/wslua/init_wslua.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/epan/wslua/init_wslua.c b/epan/wslua/init_wslua.c
index 86474817cc..dafb073a0a 100644
--- a/epan/wslua/init_wslua.c
+++ b/epan/wslua/init_wslua.c
@@ -910,8 +910,10 @@ int wslua_init(register_cb cb, gpointer client_data) {
int wslua_cleanup(void) {
/* cleanup lua */
- lua_close(L);
- L = NULL;
+ if (!L) {
+ lua_close(L);
+ L = NULL;
+ }
return 0;
}