Merge branch 'ew/object-convert-leakfix'

Leakfix.

* ew/object-convert-leakfix:
  object-file: fix leak on conversion failure
maint
Junio C Hamano 2024-07-02 09:59:01 -07:00
commit ca349c387b
1 changed files with 1 additions and 1 deletions

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);
}