write_flush(f_out);
close(fd);
- unmap_file(buf);
+ if (buf) unmap_file(buf);
free_sums(s);
}
map = map_ptr(buf,offset2,len);
+ see_token(map, len);
sum_update(map,len);
if (write_sparse(fd,map,len) != len) {
recv_ok = receive_data(f_in,buf,fd2,fname);
if (fd1 != -1) {
- unmap_file(buf);
+ if (buf) unmap_file(buf);
close(fd1);
}
close(fd2);
match_sums(f_out,s,buf,st.st_size);
write_flush(f_out);
- unmap_file(buf);
+ if (buf) unmap_file(buf);
close(fd);
free_sums(s);