forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commita85e3ba
committed
In psql, avoid leaking a PGresult after a query is cancelled.
After a query cancel, the tail end of ExecQueryAndProcessResultstook care to clear any not-yet-read PGresults; but it forgot aboutthe one it has already read. There would only be such a resultwhen handling a multi-command string made with "\;", so that you'dhave to cancel an earlier command in such a string to reach thebug at all. Even then, there would only be leakage of a singlePGresult per cancel, so it's not surprising nobody noticed this.But a leak is a leak.Noted while re-reviewing90f5178, but this is independent of that:it dates to7844c99. Back-patch to v15 where that came in.1 parent974374d commita85e3ba
1 file changed
+2
-0
lines changedLines changed: 2 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
1662 | 1662 |
| |
1663 | 1663 |
| |
1664 | 1664 |
| |
| 1665 | + | |
| 1666 | + | |
1665 | 1667 |
| |
1666 | 1668 |
| |
1667 | 1669 |
| |
|
0 commit comments
Comments
(0)