Commit 2356d73b authored by Wayne Davison's avatar Wayne Davison

The cleanup code that handles moving the temp file to the partial

file needed to check that cleanup_fname was not NULL to prevent
any possibility of a recursion starting into that code again.
parent 4968423e
......@@ -117,8 +117,8 @@ NORETURN void _exit_cleanup(int code, const char *file, int line)
}
}
if (cleanup_got_literal && cleanup_new_fname && keep_partial
&& handle_partial_dir(cleanup_new_fname, PDIR_CREATE)) {
if (cleanup_got_literal && cleanup_fname && cleanup_new_fname
&& keep_partial && handle_partial_dir(cleanup_new_fname, PDIR_CREATE)) {
char *fname = cleanup_fname;
cleanup_fname = NULL;
if (cleanup_fd_r != -1)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment