Add Lua cleanup on shutdown, to help with memory leak detection. Bug 5575 (https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=5575)
From Robert G. Jakabosky From me: cleanup so that it applies to trunk. svn path=/trunk/; revision=52798
This commit is contained in:
parent
25c43f9dc2
commit
79d58dc670
|
@ -128,6 +128,9 @@ epan_cleanup(void)
|
|||
prefs_cleanup();
|
||||
packet_cleanup();
|
||||
expert_cleanup();
|
||||
#ifdef HAVE_LUA
|
||||
wslua_cleanup();
|
||||
#endif
|
||||
#ifdef HAVE_LIBGNUTLS
|
||||
gnutls_global_deinit();
|
||||
#endif
|
||||
|
|
|
@ -486,6 +486,13 @@ int wslua_init(register_cb cb, gpointer client_data) {
|
|||
return 0;
|
||||
}
|
||||
|
||||
int wslua_cleanup(void) {
|
||||
/* cleanup lua */
|
||||
lua_close(L);
|
||||
L = NULL;
|
||||
return 0;
|
||||
}
|
||||
|
||||
lua_State* wslua_state(void) { return L; }
|
||||
|
||||
/*
|
||||
|
|
|
@ -457,6 +457,7 @@ extern void clear_outstanding_TreeItem(void);
|
|||
extern void wslua_print_stack(char* s, lua_State* L);
|
||||
|
||||
extern int wslua_init(register_cb cb, gpointer client_data);
|
||||
extern int wslua_cleanup(void);
|
||||
|
||||
extern tap_extractor_t wslua_get_tap_extractor(const gchar* name);
|
||||
extern int wslua_set_tap_enums(lua_State* L);
|
||||
|
|
Loading…
Reference in New Issue