Skip to content
Browse files
diff --no-index: don't leak buffers in queue_diff
queue_diff uses two strbufs, and at the end of the function
strbuf_reset was called.  This only reset the length of the buffer -
any allocated memory was leaked.  Using strbuf_release fixes this.

Signed-off-by: Bobby Powers <>
Reviewed-by: René Scharfe <>
Signed-off-by: Junio C Hamano <>
  • Loading branch information
bpowers authored and gitster committed May 16, 2012
1 parent f3999e0 commit 176a33542eddc6e319bfef4ca726813ce0b9af55
Showing 1 changed file with 2 additions and 2 deletions.
@@ -123,8 +123,8 @@ static int queue_diff(struct diff_options *o,
string_list_clear(&p1, 0);
string_list_clear(&p2, 0);

return ret;
} else {

0 comments on commit 176a335

Please sign in to comment.