Commit f5142c6
Apply fixes from PR #8: memory leak and dead else branch
Two bugs identified by copilot-swe-agent in PR #8:
- lib.rs: fix memory leak on ArrowArrayStreamReader::from_raw() failure.
The original code called libc::free() after the ? early-return, so the
malloc'd ArrowArrayStream struct leaked if from_raw() failed. Fix:
free unconditionally before propagating the error.
- lance_writer.cpp: remove dead no-op else branch in StreamState::push().
The else path (queue not full) called not_full_cv_.wait() with a
predicate already satisfied, making it a guaranteed immediate return.
Removing it clarifies the backpressure logic.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>1 parent 4dbec60 commit f5142c6
2 files changed
Lines changed: 2 additions & 6 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
52 | 52 | | |
53 | 53 | | |
54 | 54 | | |
55 | | - | |
56 | | - | |
57 | | - | |
58 | | - | |
59 | 55 | | |
60 | 56 | | |
61 | 57 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
211 | 211 | | |
212 | 212 | | |
213 | 213 | | |
214 | | - | |
215 | | - | |
| 214 | + | |
216 | 215 | | |
| 216 | + | |
217 | 217 | | |
218 | 218 | | |
219 | 219 | | |
| |||
0 commit comments