From: Wayne Davison Date: Sat, 14 Oct 2006 02:29:29 +0000 (+0000) Subject: The cleanup code that handles moving the temp file to the partial X-Git-Url: https://mattmccutchen.net/rsync/rsync.git/commitdiff_plain/2356d73bb400176c957a575fd8f0344d882427b9 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. --- diff --git a/cleanup.c b/cleanup.c index f1ee321d..2f47ef7f 100644 --- a/cleanup.c +++ b/cleanup.c @@ -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)