- Notifications
You must be signed in to change notification settings - Fork28
Commitbd9396a
committed
Avoid double-free in vacuumlo error path.
The code would do "PQclear(res)" twice if lo_unlink failed, evidentlydue to careless thinking about how far out a "break" would break.Remove the extra PQclear and adjust the loop logic so that we'll fallout of both levels of loop after an error, as was clearly the intent.Spotted by Coverity. I have no idea why it took this long to notice,since the bug has been there since commit67ccbb0. Accordingly,back-patch to all supported branches.1 parent276d2e6 commitbd9396a
1 file changed
+3
-4
lines changedLines changed: 3 additions & 4 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
314 | 314 |
| |
315 | 315 |
| |
316 | 316 |
| |
317 |
| - | |
| 317 | + | |
318 | 318 |
| |
319 | 319 |
| |
320 | 320 |
| |
| |||
352 | 352 |
| |
353 | 353 |
| |
354 | 354 |
| |
355 |
| - | |
356 |
| - | |
| 355 | + | |
357 | 356 |
| |
358 | 357 |
| |
359 | 358 |
| |
| |||
391 | 390 |
| |
392 | 391 |
| |
393 | 392 |
| |
394 |
| - | |
| 393 | + | |
395 | 394 |
| |
396 | 395 |
| |
397 | 396 |
| |
|
0 commit comments
Comments
(0)