forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commitb0ae6db
committed
psql: Fix memory leak with repeated calls of \bind
Calling \bind repeatedly would cause the memory allocated for the listof bind parameters to be leaked after each call, as the list is resetwhen beginning a single call.This issue is fixed by making the cleanup of the bind parameter listmore aggressive, refactoring it into a single routine called afterprocessing a query and before running an individual \bind.HEAD required more surgery and has been fixed by87eeada. Issueintroduced by5b66de3.Reported-by: Anthonin BonnefoyDiscussion:https://postgr.es/m/2e5b89af-a351-ff0a-000c-037ac28314ab@gmail.comBackpatch-through: 161 parent19b389c commitb0ae6db
3 files changed
+23
-9
lines changedLines changed: 1 addition & 1 deletion
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
471 | 471 |
| |
472 | 472 |
| |
473 | 473 |
| |
474 |
| - | |
| 474 | + | |
475 | 475 |
| |
476 | 476 |
| |
477 | 477 |
| |
|
Lines changed: 21 additions & 8 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
1275 | 1275 |
| |
1276 | 1276 |
| |
1277 | 1277 |
| |
1278 |
| - | |
1279 |
| - | |
1280 |
| - | |
1281 |
| - | |
1282 |
| - | |
1283 |
| - | |
1284 |
| - | |
1285 |
| - | |
| 1278 | + | |
1286 | 1279 |
| |
1287 | 1280 |
| |
1288 | 1281 |
| |
| |||
2252 | 2245 |
| |
2253 | 2246 |
| |
2254 | 2247 |
| |
| 2248 | + | |
| 2249 | + | |
| 2250 | + | |
| 2251 | + | |
| 2252 | + | |
| 2253 | + | |
| 2254 | + | |
| 2255 | + | |
| 2256 | + | |
| 2257 | + | |
| 2258 | + | |
| 2259 | + | |
| 2260 | + | |
| 2261 | + | |
| 2262 | + | |
| 2263 | + | |
| 2264 | + | |
| 2265 | + | |
| 2266 | + | |
| 2267 | + | |
2255 | 2268 |
| |
2256 | 2269 |
| |
2257 | 2270 |
| |
|
Lines changed: 1 addition & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
41 | 41 |
| |
42 | 42 |
| |
43 | 43 |
| |
| 44 | + | |
44 | 45 |
| |
45 | 46 |
| |
46 | 47 |
| |
|
0 commit comments
Comments
(0)