Skip to content

Commit

Permalink
cat-file: fix a minor memory leak in batch_objects
Browse files Browse the repository at this point in the history
We should always have been freeing our strbuf, but doing so
consistently was annoying until the refactoring in the
previous patch.

Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
  • Loading branch information
Jeff King authored and Junio C Hamano committed Jan 7, 2014
1 parent 07e2383 commit 648027c
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions builtin/cat-file.c
Original file line number Diff line number Diff line change
Expand Up @@ -304,6 +304,7 @@ static int batch_objects(struct batch_options *opt)
break;
}

strbuf_release(&buf);
return retval;
}

Expand Down

0 comments on commit 648027c

Please sign in to comment.