diff options
author | Dario Lombardo <lomato@gmail.com> | 2017-01-16 21:51:39 +0100 |
---|---|---|
committer | Michael Mann <mmann78@netscape.net> | 2017-01-17 03:26:04 +0000 |
commit | baf2612d9e23cb2d992f75b0a21e26a28f3985cc (patch) | |
tree | a970bb3b7bbb36684646dd0a1247d5edf03a815a /epan | |
parent | 1551f018147cfc097059eaf701909a412c72164b (diff) | |
download | wireshark-baf2612d9e23cb2d992f75b0a21e26a28f3985cc.tar.gz |
exported_pdu: add cleanup function.
Change-Id: Iafc9f1c4b2a0210d8098b37eefc095e740182258
Reviewed-on: https://code.wireshark.org/review/19648
Petri-Dish: Michael Mann <mmann78@netscape.net>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Michael Mann <mmann78@netscape.net>
Diffstat (limited to 'epan')
-rw-r--r-- | epan/epan.c | 1 | ||||
-rw-r--r-- | epan/exported_pdu.c | 12 | ||||
-rw-r--r-- | epan/exported_pdu.h | 2 |
3 files changed, 15 insertions, 0 deletions
diff --git a/epan/epan.c b/epan/epan.c index 4b3e982d81..cf578f1c69 100644 --- a/epan/epan.c +++ b/epan/epan.c @@ -206,6 +206,7 @@ epan_cleanup(void) packet_cleanup(); expert_cleanup(); capture_dissector_cleanup(); + export_pdu_cleanup(); #ifdef HAVE_LUA wslua_cleanup(); #endif diff --git a/epan/exported_pdu.c b/epan/exported_pdu.c index 523770b229..bb27341213 100644 --- a/epan/exported_pdu.c +++ b/epan/exported_pdu.c @@ -295,6 +295,18 @@ void export_pdu_init(void) { } +static void +free_list_element(gpointer elem, gpointer data _U_) +{ + g_free(elem); +} + +void export_pdu_cleanup(void) +{ + g_slist_foreach(export_pdu_tap_name_list, free_list_element, NULL); + g_slist_free(export_pdu_tap_name_list); +} + /* * Editor modelines - http://www.wireshark.org/tools/modelines.html * diff --git a/epan/exported_pdu.h b/epan/exported_pdu.h index 0512ba1684..8a3beb57c8 100644 --- a/epan/exported_pdu.h +++ b/epan/exported_pdu.h @@ -229,6 +229,8 @@ WS_DLL_PUBLIC exp_pdu_data_item_t exp_pdu_data_orig_frame_num; extern void export_pdu_init(void); +extern void export_pdu_cleanup(void); + #ifdef __cplusplus } #endif /* __cplusplus */ |