diff options
author | Guy Harris <guy@alum.mit.edu> | 2012-05-29 01:18:16 +0000 |
---|---|---|
committer | Guy Harris <guy@alum.mit.edu> | 2012-05-29 01:18:16 +0000 |
commit | 1660e397b9531c681a6747f8e37ee481630db33c (patch) | |
tree | 31b806ccaa0f31cb6d7007e1f99124cc1d076d7e /file.c | |
parent | 1020c20d9e94f3c0ddcf04a0e33cf2c4f1a66deb (diff) | |
download | wireshark-1660e397b9531c681a6747f8e37ee481630db33c.tar.gz wireshark-1660e397b9531c681a6747f8e37ee481630db33c.tar.bz2 wireshark-1660e397b9531c681a6747f8e37ee481630db33c.zip |
Test was backwards - if fname_new is *NON*-null, it was the name of a
temporary file to which we were writing in order to do a "safe save".
Thanks to Coverity for pointing this out - should fix CIDs 703317 and
703316.
svn path=/trunk/; revision=42891
Diffstat (limited to 'file.c')
-rw-r--r-- | file.c | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -4029,7 +4029,7 @@ cf_save_packets(capture_file *cf, const char *fname, guint save_format, return CF_OK; fail: - if (fname_new == NULL) { + if (fname_new != NULL) { /* We were trying to write to a temporary file; get rid of it if it exists. (We don't care whether this fails, as, if it fails, there's not much we can do about it. I guess if it failed for @@ -4142,7 +4142,7 @@ cf_export_specified_packets(capture_file *cf, const char *fname, return CF_OK; fail: - if (fname_new == NULL) { + if (fname_new != NULL) { /* We were trying to write to a temporary file; get rid of it if it exists. (We don't care whether this fails, as, if it fails, there's not much we can do about it. I guess if it failed for |