forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commit6a694bb
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 parent9880fea commit6a694bb
1 file changed
+7
-7
lines changedLines changed: 7 additions & 7 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
139 | 139 |
| |
140 | 140 |
| |
141 | 141 |
| |
| 142 | + | |
| 143 | + | |
142 | 144 |
| |
143 | 145 |
| |
144 |
| - | |
145 |
| - | |
146 | 146 |
| |
147 | 147 |
| |
148 | 148 |
| |
| |||
153 | 153 |
| |
154 | 154 |
| |
155 | 155 |
| |
| 156 | + | |
| 157 | + | |
156 | 158 |
| |
157 | 159 |
| |
158 |
| - | |
159 |
| - | |
160 | 160 |
| |
161 | 161 |
| |
162 | 162 |
| |
163 | 163 |
| |
164 | 164 |
| |
165 | 165 |
| |
166 | 166 |
| |
167 |
| - | |
168 | 167 |
| |
169 |
| - | |
170 |
| - | |
171 | 168 |
| |
| 169 | + | |
| 170 | + | |
| 171 | + | |
172 | 172 |
| |
173 | 173 |
| |
174 | 174 |
| |
|
0 commit comments
Comments
(0)