forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commitf8d67ca
committed
Fix (some of) pltcl memory usage
As reported by Bill Parker, PL/Tcl did not validate some malloc() callsagainst NULL return. Fix by using palloc() in a new long-lived memorycontext instead. This allows us to simplify error handling too, bysimply deleting the memory context instead of doing retail frees.There's still a lot that could be done to improve PL/Tcl's memoryhandling ...This is pretty ancient, so backpatch all the way back.Author: Michael Paquier and Álvaro HerreraDiscussion:https://www.postgresql.org/message-id/CAFrbyQwyLDYXfBOhPfoBGqnvuZO_Y90YgqFM11T2jvnxjLFmqw@mail.gmail.com1 parent8d90736 commitf8d67ca
1 file changed
+18
-9
lines changedLines changed: 18 additions & 9 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
2104 | 2104 |
| |
2105 | 2105 |
| |
2106 | 2106 |
| |
| 2107 | + | |
2107 | 2108 |
| |
2108 | 2109 |
| |
2109 | 2110 |
| |
| |||
2132 | 2133 |
| |
2133 | 2134 |
| |
2134 | 2135 |
| |
| 2136 | + | |
| 2137 | + | |
| 2138 | + | |
| 2139 | + | |
2135 | 2140 |
| |
2136 |
| - | |
| 2141 | + | |
| 2142 | + | |
| 2143 | + | |
| 2144 | + | |
| 2145 | + | |
| 2146 | + | |
| 2147 | + | |
2137 | 2148 |
| |
2138 | 2149 |
| |
2139 |
| - | |
2140 |
| - | |
2141 |
| - | |
| 2150 | + | |
| 2151 | + | |
| 2152 | + | |
| 2153 | + | |
2142 | 2154 |
| |
2143 | 2155 |
| |
2144 | 2156 |
| |
| |||
2166 | 2178 |
| |
2167 | 2179 |
| |
2168 | 2180 |
| |
2169 |
| - | |
| 2181 | + | |
2170 | 2182 |
| |
2171 | 2183 |
| |
2172 | 2184 |
| |
| |||
2193 | 2205 |
| |
2194 | 2206 |
| |
2195 | 2207 |
| |
2196 |
| - | |
2197 |
| - | |
2198 |
| - | |
2199 |
| - | |
| 2208 | + | |
2200 | 2209 |
| |
2201 | 2210 |
| |
2202 | 2211 |
| |
|
0 commit comments
Comments
(0)