write_flush(f_out);
close(fd);
- unmap_file(buf);
+ if (buf) unmap_file(buf);
free_sums(s);
}
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);