diff options
author | Dario Lombardo <lomato@gmail.com> | 2017-02-20 14:05:15 +0100 |
---|---|---|
committer | Michael Mann <mmann78@netscape.net> | 2017-02-26 18:00:23 +0000 |
commit | 2de30dd18d86ddd7dd0f5aab636f36d1f4a37cc1 (patch) | |
tree | 205adfabcafcfb0237bbab0359703241b3b67974 /wiretap/file_access.c | |
parent | dcfc288130e0576249f3ba7f8db7ad1681ff70f5 (diff) |
wsutil: fix bugs in plugins_cleanup().
If plugin_list was NULL, plugin_types didn't get cleaned.
Add test and set of open_info_arr.
Change-Id: I7669e3ba86039fb2b26ff2da64f51896053c5e68
Reviewed-on: https://code.wireshark.org/review/20195
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 'wiretap/file_access.c')
-rw-r--r-- | wiretap/file_access.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/wiretap/file_access.c b/wiretap/file_access.c index 4448b36355..4e725afb0a 100644 --- a/wiretap/file_access.c +++ b/wiretap/file_access.c @@ -2724,13 +2724,14 @@ cleanup_open_routines(void) guint i; struct open_info *i_open; - if (open_routines != NULL) { + if (open_routines != NULL && open_info_arr) { 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); + open_info_arr = NULL; } } |