Merge branch 'ps/reftable-block-search-fix'

The reftable code has its own custom binary search function whose
comparison callback has an unusual interface, which caused the
binary search to degenerate into a linear search, which has been
corrected.

* ps/reftable-block-search-fix:
  reftable/block: fix binary search over restart counter
  reftable/record: fix memory leak when decoding object records
This commit is contained in:
Junio C Hamano
2024-03-21 14:55:12 -07:00
2 changed files with 3 additions and 1 deletions

View File

@ -588,6 +588,8 @@ static int reftable_obj_record_decode(void *rec, struct strbuf key,
uint64_t last;
int j;
reftable_obj_record_release(r);
REFTABLE_ALLOC_ARRAY(r->hash_prefix, key.len);
memcpy(r->hash_prefix, key.buf, key.len);
r->hash_prefix_len = key.len;