git cat-file: Fix memory leak in batch mode