forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commitb2efbb7
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 parent498a29d commitb2efbb7
1 file changed
+18
-9
lines changedLines changed: 18 additions & 9 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
2039 | 2039 |
| |
2040 | 2040 |
| |
2041 | 2041 |
| |
| 2042 | + | |
2042 | 2043 |
| |
2043 | 2044 |
| |
2044 | 2045 |
| |
| |||
2067 | 2068 |
| |
2068 | 2069 |
| |
2069 | 2070 |
| |
| 2071 | + | |
| 2072 | + | |
| 2073 | + | |
| 2074 | + | |
2070 | 2075 |
| |
2071 |
| - | |
| 2076 | + | |
| 2077 | + | |
| 2078 | + | |
| 2079 | + | |
| 2080 | + | |
| 2081 | + | |
| 2082 | + | |
2072 | 2083 |
| |
2073 | 2084 |
| |
2074 |
| - | |
2075 |
| - | |
2076 |
| - | |
| 2085 | + | |
| 2086 | + | |
| 2087 | + | |
| 2088 | + | |
2077 | 2089 |
| |
2078 | 2090 |
| |
2079 | 2091 |
| |
| |||
2101 | 2113 |
| |
2102 | 2114 |
| |
2103 | 2115 |
| |
2104 |
| - | |
| 2116 | + | |
2105 | 2117 |
| |
2106 | 2118 |
| |
2107 | 2119 |
| |
| |||
2128 | 2140 |
| |
2129 | 2141 |
| |
2130 | 2142 |
| |
2131 |
| - | |
2132 |
| - | |
2133 |
| - | |
2134 |
| - | |
| 2143 | + | |
2135 | 2144 |
| |
2136 | 2145 |
| |
2137 | 2146 |
| |
|
0 commit comments
Comments
(0)