If it happens that read fails for any reason and the code retries
reading, the previous read buffer is not freed properly. This causes a
minor (26 byte) memory leak on each retry. Add a free() call to avoid
the leak.
Signed-off-by: Timo Kokkonen <timo.t.kokkonen@iki.fi>