forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commit49c3000
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 parent29efe1b commit49c3000
1 file changed
+18
-9
lines changedLines changed: 18 additions & 9 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
2106 | 2106 |
| |
2107 | 2107 |
| |
2108 | 2108 |
| |
| 2109 | + | |
2109 | 2110 |
| |
2110 | 2111 |
| |
2111 | 2112 |
| |
| |||
2134 | 2135 |
| |
2135 | 2136 |
| |
2136 | 2137 |
| |
| 2138 | + | |
| 2139 | + | |
| 2140 | + | |
| 2141 | + | |
2137 | 2142 |
| |
2138 |
| - | |
| 2143 | + | |
| 2144 | + | |
| 2145 | + | |
| 2146 | + | |
| 2147 | + | |
| 2148 | + | |
| 2149 | + | |
2139 | 2150 |
| |
2140 | 2151 |
| |
2141 |
| - | |
2142 |
| - | |
2143 |
| - | |
| 2152 | + | |
| 2153 | + | |
| 2154 | + | |
| 2155 | + | |
2144 | 2156 |
| |
2145 | 2157 |
| |
2146 | 2158 |
| |
| |||
2168 | 2180 |
| |
2169 | 2181 |
| |
2170 | 2182 |
| |
2171 |
| - | |
| 2183 | + | |
2172 | 2184 |
| |
2173 | 2185 |
| |
2174 | 2186 |
| |
| |||
2195 | 2207 |
| |
2196 | 2208 |
| |
2197 | 2209 |
| |
2198 |
| - | |
2199 |
| - | |
2200 |
| - | |
2201 |
| - | |
| 2210 | + | |
2202 | 2211 |
| |
2203 | 2212 |
| |
2204 | 2213 |
| |
|
0 commit comments
Comments
(0)