From 2de30dd18d86ddd7dd0f5aab636f36d1f4a37cc1 Mon Sep 17 00:00:00 2001 From: Dario Lombardo Date: Mon, 20 Feb 2017 14:05:15 +0100 Subject: 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 Tested-by: Petri Dish Buildbot Reviewed-by: Michael Mann --- wiretap/file_access.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'wiretap/file_access.c') 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; } } -- cgit v1.2.3