forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commitf2004f1
committed
Fix memory leak in printtup.c.
Commitf2dec34 changed things so that printtup's output stringinfobuffer was allocated outside the per-row temporary context, not insideit. This creates a need to free that buffer explicitly when the tempcontext is freed, but that was overlooked. In most cases, this is allhappening inside a portal or executor context that will go away shortlyanyhow, but that's not always true. Notably, the stringinfo ends upgetting leaked when JDBC uses row-at-a-time fetches. For a querythat returns wide rows, that adds up after awhile.Per bug #15700 from Matthias Otterbach. Back-patch to v11 where thefaulty code was added.Discussion:https://postgr.es/m/15700-8c408321a87d56bb@postgresql.org1 parent11180a5 commitf2004f1
1 file changed
+10
-2
lines changedLines changed: 10 additions & 2 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
61 | 61 |
| |
62 | 62 |
| |
63 | 63 |
| |
64 |
| - | |
65 | 64 |
| |
66 | 65 |
| |
67 | 66 |
| |
68 | 67 |
| |
69 | 68 |
| |
| 69 | + | |
70 | 70 |
| |
71 | 71 |
| |
72 | 72 |
| |
| |||
94 | 94 |
| |
95 | 95 |
| |
96 | 96 |
| |
| 97 | + | |
97 | 98 |
| |
98 | 99 |
| |
99 | 100 |
| |
| |||
132 | 133 |
| |
133 | 134 |
| |
134 | 135 |
| |
135 |
| - | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
136 | 140 |
| |
137 | 141 |
| |
138 | 142 |
| |
| |||
544 | 548 |
| |
545 | 549 |
| |
546 | 550 |
| |
| 551 | + | |
| 552 | + | |
| 553 | + | |
| 554 | + | |
547 | 555 |
| |
548 | 556 |
| |
549 | 557 |
| |
|
0 commit comments
Comments
(0)