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
This commit is contained in:
parent
1020c20d9e
commit
1660e397b9
4
file.c
4
file.c
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue