Commit d125096
Fix resource leak: close staging Rows in execStagingOperation (#325)
## Summary
- `execStagingOperation` creates a `Rows` object via `rows.NewRows()` to
read staging operation metadata (presigned URL, headers, local file
path) but never calls `row.Close()`
- This leaks the `Rows` object and its `RowScanner` resources until GC
collects them
- Add `defer row.Close()` to ensure proper cleanup after reading the
staging metadata
Note: the server-side operation is already closed by `ExecContext`
(lines 122-133), so this is a client-side resource leak rather than a
server-side operation leak.
## Test plan
- [x] Existing `TestConn_execStagingOperation` tests pass
- [x] `TestWorkflowExample` e2e test passes
- [x] `go build ./...` compiles cleanly
Related: #275
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>1 parent 98148d9 commit d125096
1 file changed
+1
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
592 | 592 | | |
593 | 593 | | |
594 | 594 | | |
| 595 | + | |
595 | 596 | | |
596 | 597 | | |
597 | 598 | | |
| |||
0 commit comments