iolog: Don't leak memory if fread fails in iolog_file_inflate
authorErwan Velu <erwan.velu@enovance.com>
Thu, 19 Feb 2015 12:04:08 +0000 (13:04 +0100)
committerErwan Velu <erwan.velu@enovance.com>
Thu, 19 Feb 2015 12:04:47 +0000 (13:04 +0100)
commit244484810a69a2371d938b2a10dc468a667dd029
treec3520b5fb825b7b17b2da0cd608adf2c68fe144b
parent83da8fbfa3cdcd16bef7276af6aec0eea4a4566b
iolog: Don't leak memory if fread fails in iolog_file_inflate

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.
iolog.c