Commit 986590f
reftable/block: fix use of uninitialized memory when binsearch fails
When doing the binary search through our restart offsets we may hit an
error in case `restart_needle_less()` fails to decode the record at the
given offset. While we correctly detect this case and error out, it will
cause us to call `reftable_record_release()` on the yet-uninitialized
record.
Fix this by initializing the record earlier.
Signed-off-by: Patrick Steinhardt <ps@pks.im>
Signed-off-by: Junio C Hamano <gitster@pobox.com>1 parent 0d77a81 commit 986590f
1 file changed
Lines changed: 4 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
517 | 517 | | |
518 | 518 | | |
519 | 519 | | |
| 520 | + | |
| 521 | + | |
| 522 | + | |
| 523 | + | |
520 | 524 | | |
521 | 525 | | |
522 | 526 | | |
| |||
558 | 562 | | |
559 | 563 | | |
560 | 564 | | |
561 | | - | |
562 | | - | |
563 | | - | |
564 | | - | |
565 | 565 | | |
566 | 566 | | |
567 | 567 | | |
| |||
0 commit comments