- Notifications
You must be signed in to change notification settings - Fork5
Commitcec62ef
committed
Be sure to close() file descriptor on error case
In receivelog.c:writeTimeLineHistoryFile(), we were not properlyclosing the open'd file descriptor in error cases. While thiswouldn't matter much if we were about to exit due to such anerror, that's not the case with pg_receivexlog as it can be along-running process and these errors are non-fatal.This resource leak was found by the Coverity scanner.Back-patch to 9.3 where this issue first appeared.1 parent273dcd1 commitcec62ef
1 file changed
+2
-0
lines changedLines changed: 2 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
329 | 329 |
| |
330 | 330 |
| |
331 | 331 |
| |
| 332 | + | |
332 | 333 |
| |
333 | 334 |
| |
334 | 335 |
| |
| |||
339 | 340 |
| |
340 | 341 |
| |
341 | 342 |
| |
| 343 | + | |
342 | 344 |
| |
343 | 345 |
| |
344 | 346 |
| |
|
0 commit comments
Comments
(0)