Skip to content

Commit ca349c3

Browse files
committed
Merge branch 'ew/object-convert-leakfix'
Leakfix. * ew/object-convert-leakfix: object-file: fix leak on conversion failure
2 parents ca46310 + 493fdae commit ca349c3

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

object-file.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -1708,9 +1708,9 @@ static int oid_object_info_convert(struct repository *r,
17081708
ret = convert_object_file(&outbuf,
17091709
the_hash_algo, input_algo,
17101710
content, size, type, !do_die);
1711+
free(content);
17111712
if (ret == -1)
17121713
return -1;
1713-
free(content);
17141714
size = outbuf.len;
17151715
content = strbuf_detach(&outbuf, NULL);
17161716
}

0 commit comments

Comments
 (0)