aboutsummaryrefslogtreecommitdiffstats
path: root/cleanup.c
diff options
context:
space:
mode:
authorWayne Davison <wayned@samba.org>2005-11-10 16:56:32 +0000
committerWayne Davison <wayned@samba.org>2005-11-10 16:56:32 +0000
commit3d7cc5710d5c1d6f25c0b3369411367e4870b542 (patch)
tree2400bc8446c53f34c3edc77c0323d4e60a1cf41a /cleanup.c
parent86fc7e6880ed3687db1dbdf50c5271c8185eb45b (diff)
downloadandroid_external_rsync-3d7cc5710d5c1d6f25c0b3369411367e4870b542.tar.gz
android_external_rsync-3d7cc5710d5c1d6f25c0b3369411367e4870b542.tar.bz2
android_external_rsync-3d7cc5710d5c1d6f25c0b3369411367e4870b542.zip
If cleanup_set() gets passed a NULL fnametmp or fname, set
cleanup_fname to NULL.
Diffstat (limited to 'cleanup.c')
-rw-r--r--cleanup.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/cleanup.c b/cleanup.c
index 78c048a4..8d490ef8 100644
--- a/cleanup.c
+++ b/cleanup.c
@@ -166,7 +166,7 @@ void cleanup_disable(void)
void cleanup_set(char *fnametmp, char *fname, struct file_struct *file,
int fd_r, int fd_w)
{
- cleanup_fname = fnametmp;
+ cleanup_fname = fname ? fnametmp : NULL;
cleanup_new_fname = fname;
cleanup_file = file;
cleanup_fd_r = fd_r;