Ensure propertly cleanup when image writting is canceled.
This commit is contained in:
parent
bf5bf7af98
commit
99bcef4c53
@ -295,10 +295,13 @@ int filesrc_writer_write_data(IsoImageWriter *writer)
|
||||
wres = iso_write(t, buffer, BLOCK_SIZE);
|
||||
if (wres < 0) {
|
||||
/* ko, writer error, we need to go out! */
|
||||
filesrc_close(file);
|
||||
return wres;
|
||||
}
|
||||
}
|
||||
|
||||
filesrc_close(file);
|
||||
|
||||
if (b < nblocks) {
|
||||
/* premature end of file, due to error or eof */
|
||||
char *name = iso_stream_get_name(file->stream);
|
||||
@ -329,8 +332,6 @@ int filesrc_writer_write_data(IsoImageWriter *writer)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
filesrc_close(file);
|
||||
}
|
||||
|
||||
return ISO_SUCCESS;
|
||||
|
Loading…
Reference in New Issue
Block a user