diff options
author | Guy Harris <guy@alum.mit.edu> | 2017-04-17 17:09:26 -0700 |
---|---|---|
committer | Guy Harris <guy@alum.mit.edu> | 2017-04-18 00:10:12 +0000 |
commit | c9bb6b8282eb5c829bc4cb07f4bc2e53f409c0c5 (patch) | |
tree | d7083e71b486421682dee65a61b309546d22bc34 /editcap.c | |
parent | 3fac48da689998ca0942ec2bdcb0dabd77e04a36 (diff) |
Don't close a wtap that you don't have open in the first place.
Change-Id: I4d9d539957d06cb3568df287eb36ecc34677373f
Reviewed-on: https://code.wireshark.org/review/21170
Reviewed-by: Guy Harris <guy@alum.mit.edu>
Diffstat (limited to 'editcap.c')
-rw-r--r-- | editcap.c | 3 |
1 files changed, 2 insertions, 1 deletions
@@ -1906,7 +1906,8 @@ clean_exit: wtap_block_array_free(shb_hdrs); wtap_block_array_free(nrb_hdrs); g_free(idb_inf); - wtap_close(wth); + if (wth != NULL) + wtap_close(wth); wtap_cleanup(); free_progdirs(); #ifdef HAVE_PLUGINS |