diff options
author | Michael Mann <mmann78@netscape.net> | 2017-02-18 15:29:56 -0500 |
---|---|---|
committer | Michael Mann <mmann78@netscape.net> | 2017-02-18 22:35:27 +0000 |
commit | 0a4273f338a038da541e9f647e41f928fdc44338 (patch) | |
tree | b70d5d05c86cf6967f8cae3a2526a05bf99f729a /wiretap/file_access.c | |
parent | 8c758f06c3b9de7aaaad2ca5fdb5f8b0ed0a4116 (diff) | |
download | wireshark-0a4273f338a038da541e9f647e41f928fdc44338.tar.gz |
Only cleanup open_routines if not NULL
Change-Id: I76ea675625ef2812f51bad0c37f6c58060897f55
Reviewed-on: https://code.wireshark.org/review/20172
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 | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/wiretap/file_access.c b/wiretap/file_access.c index 5b3e75ea61..4448b36355 100644 --- a/wiretap/file_access.c +++ b/wiretap/file_access.c @@ -2724,12 +2724,14 @@ 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); - } + if (open_routines != NULL) { + 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); + g_array_free(open_info_arr, TRUE); + } } /* |