Fix memory leak

If `fread` fails, `file_contents` is leaked.  I’m just freeing the memory allocated :)