diff options
Diffstat (limited to 'wiretap/wtap.c')
-rw-r--r-- | wiretap/wtap.c | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/wiretap/wtap.c b/wiretap/wtap.c index e14953b624..6473d43ee9 100644 --- a/wiretap/wtap.c +++ b/wiretap/wtap.c @@ -936,6 +936,13 @@ static void wtap_init_encap_types(void) { g_array_append_vals(encap_table_arr,encap_table_base,wtap_num_encap_types); } +static void wtap_cleanup_encap_types(void) { + if (encap_table_arr) { + g_array_free(encap_table_arr, TRUE); + encap_table_arr = NULL; + } +} + int wtap_get_num_encap_types(void) { return wtap_num_encap_types; } @@ -1429,6 +1436,17 @@ wtap_init(void) } /* + * Cleanup the library + */ +void +wtap_cleanup(void) +{ + wtap_cleanup_encap_types(); + wtap_opttypes_cleanup(); + ws_buffer_cleanup(); +} + +/* * Editor modelines - http://www.wireshark.org/tools/modelines.html * * Local variables: |