Browse Source

Clarified handling of file descriptor. Coverity CID 28753.

master
Thomas Schmitt 6 years ago
parent
commit
089ff7586c
  1. 6
      xorriso/read_run.c
  2. 2
      xorriso/xorriso_timestamp.h

6
xorriso/read_run.c

@ -2,7 +2,7 @@
/* xorriso - creates, loads, manipulates and burns ISO 9660 filesystem images.
Copyright 2007-2014 Thomas Schmitt, <scdbackup@gmx.net>
Copyright 2007-2015 Thomas Schmitt, <scdbackup@gmx.net>
Provided under GPL version 2 or later.
@ -668,7 +668,7 @@ int Xorriso_tree_restore_node(struct XorrisO *xorriso, IsoNode *node,
break;
}
}
if(write_fd > 0)
if(write_fd != -1)
close(write_fd);
write_fd= -1;
if(todo > 0 && xorriso->extract_error_mode == 2 && open_path_pt != NULL) {
@ -779,7 +779,7 @@ restore_properties:;
if(todo < 0)
ret= 0;
ex:;
if(write_fd >= 0) {
if(write_fd != -1) {
close(write_fd);
if(ret <= 0 && xorriso->extract_error_mode == 2 && open_path_pt != NULL)
unlink(open_path_pt);

2
xorriso/xorriso_timestamp.h

@ -1 +1 @@
#define Xorriso_timestamP "2015.11.03.145920"
#define Xorriso_timestamP "2015.11.03.150839"

Loading…
Cancel
Save