finished 64 bit file offset support. Hopefully rsync can now transfer
[rsync/rsync.git] / rsync.c
diff --git a/rsync.c b/rsync.c
index e9b5e3f..7dab528 100644 (file)
--- a/rsync.c
+++ b/rsync.c
@@ -651,7 +651,7 @@ static void delete_files(struct file_list *flist)
   }
 }
 
-static char *cleanup_fname = NULL;
+static char *cleanup_fname;
 
 void exit_cleanup(int code)
 {
@@ -936,12 +936,14 @@ off_t send_files(struct file_list *flist,int f_out,int f_in)
          if (fd == -1) {
                  fprintf(FERROR,"send_files failed to open %s: %s\n",
                          fname,strerror(errno));
+                 free_sums(s);
                  continue;
          }
          
          /* map the local file */
          if (fstat(fd,&st) != 0) {
                  fprintf(FERROR,"fstat failed : %s\n",strerror(errno));
+                 free_sums(s);
                  close(fd);
                  return -1;
          }
@@ -1051,7 +1053,7 @@ void generate_files(int f,struct file_list *flist,char *local_name,int f_recv)
 
 
   if (verbose > 2)
-    fprintf(FERROR,"generator wrote %d\n",write_total());
+    fprintf(FERROR,"generator wrote %ld\n",(long)write_total());
 }