Avoided to close unopened file pointer in case of error. Coverity CID 12546.

This commit is contained in:
Thomas Schmitt 2015-10-11 15:18:03 +02:00
parent fa5e27458a
commit 7bdc4c96f5

View File

@ -2037,7 +2037,8 @@ int iso_write_partition_file(Ecma119Image *target, char *path,
}
ret = iso_write(target, buf, BLOCK_SIZE);
if (ret < 0) {
fclose(fp);
if (fp != NULL)
fclose(fp);
goto ex;
}
}