Commit decf797
Fix buffer0 leak in QwpWebSocketSender constructor
If the second MicrobatchBuffer allocation (buffer1) throws,
the already-allocated buffer0 leaks its native memory. Neither
connect() nor createForTesting() catch constructor failures,
so the cleanup must happen in the constructor itself. Wrap
the buffer1 allocation in a try-catch that closes buffer0
before re-throwing.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>1 parent 65270d6 commit decf797
1 file changed
Lines changed: 6 additions & 1 deletion
Lines changed: 6 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
183 | 183 | | |
184 | 184 | | |
185 | 185 | | |
186 | | - | |
| 186 | + | |
| 187 | + | |
| 188 | + | |
| 189 | + | |
| 190 | + | |
| 191 | + | |
187 | 192 | | |
188 | 193 | | |
189 | 194 | | |
| |||
0 commit comments