1
0
mirror of https://github.com/git/git.git synced 2024-09-08 03:50:44 +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:
Junio C Hamano 2024-07-02 09:59:01 -07:00
commit ca349c387b

View File

@ -1708,9 +1708,9 @@ static int oid_object_info_convert(struct repository *r,
ret = convert_object_file(&outbuf,
the_hash_algo, input_algo,
content, size, type, !do_die);
free(content);
if (ret == -1)
return -1;
free(content);
size = outbuf.len;
content = strbuf_detach(&outbuf, NULL);
}