diff options
author | Stig Bjørlykke <stig@bjorlykke.org> | 2019-01-28 09:16:32 +0100 |
---|---|---|
committer | Stig Bjørlykke <stig@bjorlykke.org> | 2019-01-28 10:57:30 +0000 |
commit | 6cab8c57bd0174ffbba203d456d8b10bd3fa02a5 (patch) | |
tree | 1ee3d6240c53ea793688ec8a1c8ef4fe56849efa /epan/funnel.h | |
parent | 5b226240c6586b10dccf4ec573f9732097bebcd6 (diff) |
funnel: Fix memleaks in funnel_remove_menu
The loop to remove all matching callbacks was skipping every second
entry which would give some leaks when reloading Lua plugins.
Add funnel_cleanup() to be called in epan_cleanup() at shutdown
to remove all allocated menu entries.
Change-Id: I3a50ba2070c8675fee1385f25e9e109db57c2dc5
Reviewed-on: https://code.wireshark.org/review/31769
Petri-Dish: Stig Bjørlykke <stig@bjorlykke.org>
Tested-by: Petri Dish Buildbot
Reviewed-by: Peter Wu <peter@lekensteyn.nl>
Reviewed-by: Stig Bjørlykke <stig@bjorlykke.org>
Diffstat (limited to 'epan/funnel.h')
-rw-r--r-- | epan/funnel.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/epan/funnel.h b/epan/funnel.h index 30ad70aa54..ab522c3ff3 100644 --- a/epan/funnel.h +++ b/epan/funnel.h @@ -111,6 +111,7 @@ typedef void (*funnel_deregistration_cb_t)(funnel_menu_callback callback); WS_DLL_PUBLIC void funnel_register_all_menus(funnel_registration_cb_t r_cb); WS_DLL_PUBLIC void funnel_reload_menus(funnel_deregistration_cb_t d_cb, funnel_registration_cb_t r_cb); +WS_DLL_PUBLIC void funnel_cleanup(void); extern void initialize_funnel_ops(void); |