}
}
-static char *cleanup_fname = NULL;
+static char *cleanup_fname;
void exit_cleanup(int code)
{
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;
}
if (verbose > 2)
- fprintf(FERROR,"generator wrote %d\n",write_total());
+ fprintf(FERROR,"generator wrote %ld\n",(long)write_total());
}