Delete the output file in case of error

This commit is contained in:
olszomal
2023-11-07 13:17:37 +01:00
committed by Michał Trojnara
parent e290e03341
commit ef5047038e
2 changed files with 14 additions and 0 deletions

View File

@ -4076,6 +4076,13 @@ int main(int argc, char **argv)
ret = 1; /* FAILED */
BIO_free_all(hash);
BIO_free_all(outdata);
if (options.outfile) {
#ifdef WIN32
_unlink(options.outfile);
#else
unlink(options.outfile);
#endif /* WIN32 */
}
DO_EXIT_0("Initialization error or unsupported input file type.\n");
}
if (options.cmd == CMD_VERIFY) {