mirror of
https://github.com/git/git.git
synced 2024-09-19 03:02:51 +02:00
Merge branch 'ew/object-convert-leakfix'
Leakfix. * ew/object-convert-leakfix: object-file: fix leak on conversion failure
This commit is contained in:
commit
ca349c387b
@ -1708,9 +1708,9 @@ static int oid_object_info_convert(struct repository *r,
|
|||||||
ret = convert_object_file(&outbuf,
|
ret = convert_object_file(&outbuf,
|
||||||
the_hash_algo, input_algo,
|
the_hash_algo, input_algo,
|
||||||
content, size, type, !do_die);
|
content, size, type, !do_die);
|
||||||
|
free(content);
|
||||||
if (ret == -1)
|
if (ret == -1)
|
||||||
return -1;
|
return -1;
|
||||||
free(content);
|
|
||||||
size = outbuf.len;
|
size = outbuf.len;
|
||||||
content = strbuf_detach(&outbuf, NULL);
|
content = strbuf_detach(&outbuf, NULL);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user