forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commit168636a
committed
Free libxml2/libxslt resources in a safer order.
Mark Simonetti reported that libxslt sometimes crashes for him, and thatswapping xslt_process's object-freeing calls around to do them in reverseorder of creation seemed to fix it. I've not reproduced the crash, butvalgrind clearly shows a reference to already-freed memory, which isconsistent with the idea that shutdown of the xsltTransformContext istrying to reference the already-freed stylesheet or input document.With this patch, valgrind is no longer unhappy.I have an inquiry in to see if this is a libxslt bug or if we're justabusing the library; but even if it's a library bug, we'd want to adjustour code so it doesn't fail with unpatched libraries.Back-patch to all supported branches, because we've been doing this inthe wrong(?) order for a long time.1 parent95be343 commit168636a
1 file changed
+7
-7
lines changedLines changed: 7 additions & 7 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
140 | 140 |
| |
141 | 141 |
| |
142 | 142 |
| |
| 143 | + | |
| 144 | + | |
143 | 145 |
| |
144 | 146 |
| |
145 |
| - | |
146 |
| - | |
147 | 147 |
| |
148 | 148 |
| |
149 | 149 |
| |
| |||
154 | 154 |
| |
155 | 155 |
| |
156 | 156 |
| |
| 157 | + | |
| 158 | + | |
157 | 159 |
| |
158 | 160 |
| |
159 |
| - | |
160 |
| - | |
161 | 161 |
| |
162 | 162 |
| |
163 | 163 |
| |
164 | 164 |
| |
165 | 165 |
| |
166 | 166 |
| |
167 | 167 |
| |
168 |
| - | |
169 | 168 |
| |
170 |
| - | |
171 |
| - | |
172 | 169 |
| |
| 170 | + | |
| 171 | + | |
| 172 | + | |
173 | 173 |
| |
174 | 174 |
| |
175 | 175 |
| |
|
0 commit comments
Comments
(0)