If fread fails in iolog_file_inflate(), the current code was closing the
file descriptor and return 1. But it was missing freeing the previously
malloced buffer (buf).
This patch does add a memory free of 'buf' before returning to avoid the
memory leak.