forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commita1cd04c
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 parent9b468bc commita1cd04c
1 file changed
+9
-9
lines changedLines changed: 9 additions & 9 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
150 | 150 |
| |
151 | 151 |
| |
152 | 152 |
| |
153 |
| - | |
154 |
| - | |
155 | 153 |
| |
156 | 154 |
| |
157 |
| - | |
158 |
| - | |
159 |
| - | |
160 |
| - | |
161 | 155 |
| |
162 | 156 |
| |
| 157 | + | |
| 158 | + | |
| 159 | + | |
| 160 | + | |
| 161 | + | |
| 162 | + | |
163 | 163 |
| |
164 | 164 |
| |
165 | 165 |
| |
| |||
168 | 168 |
| |
169 | 169 |
| |
170 | 170 |
| |
171 |
| - | |
172 | 171 |
| |
173 |
| - | |
174 |
| - | |
175 | 172 |
| |
| 173 | + | |
| 174 | + | |
| 175 | + | |
176 | 176 |
| |
177 | 177 |
| |
178 | 178 |
| |
|
0 commit comments
Comments
(0)