wiretap: add open_routines cleanup function.
Change-Id: Id88fe84189b8baa597eaa69159395cdc4bc56195 Reviewed-on: https://code.wireshark.org/review/19951 Petri-Dish: Dario Lombardo <lomato@gmail.com> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Michael Mann <mmann78@netscape.net>
This commit is contained in:
parent
52637ad6f6
commit
67d8830f2f
|
@ -2718,6 +2718,20 @@ wtap_dump_file_tell(wtap_dumper *wdh, int *err)
|
|||
}
|
||||
}
|
||||
|
||||
void
|
||||
cleanup_open_routines(void)
|
||||
{
|
||||
guint i;
|
||||
struct open_info *i_open;
|
||||
|
||||
for (i = 0, i_open = open_routines; i < open_info_arr->len; i++, i_open++) {
|
||||
if (i_open->extensions != NULL)
|
||||
g_strfreev(i_open->extensions_set);
|
||||
}
|
||||
|
||||
g_array_free(open_info_arr, TRUE);
|
||||
}
|
||||
|
||||
/*
|
||||
* Editor modelines - http://www.wireshark.org/tools/modelines.html
|
||||
*
|
||||
|
|
|
@ -1444,6 +1444,7 @@ wtap_cleanup(void)
|
|||
wtap_cleanup_encap_types();
|
||||
wtap_opttypes_cleanup();
|
||||
ws_buffer_cleanup();
|
||||
cleanup_open_routines();
|
||||
}
|
||||
|
||||
/*
|
||||
|
|
|
@ -1448,6 +1448,8 @@ typedef enum {
|
|||
|
||||
WS_DLL_PUBLIC void init_open_routines(void);
|
||||
|
||||
void cleanup_open_routines(void);
|
||||
|
||||
struct open_info {
|
||||
const char *name;
|
||||
wtap_open_type type;
|
||||
|
|
Loading…
Reference in New Issue