- Notifications
You must be signed in to change notification settings - Fork5
Commit357f752
committed
Fix snapshot leak if lo_open called on non-existent object.
lo_open registers the currently active snapshot, and checks if thelarge object exists after that. Normally, snapshots registered by lo_openare unregistered at end of transaction when the lo descriptor is closed, butif we error out before the lo descriptor is added to the list of opendescriptors, it is leaked. Fix by moving the snapshot registration to afterchecking if the large object exists.Reported by Pavel Stehule. Backpatch to 8.4. The snapshot registrationsystem was introduced in 8.4, so prior versions are not affected (and notsupported, anyway).1 parent514b319 commit357f752
1 file changed
+26
-18
lines changedLines changed: 26 additions & 18 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
240 | 240 |
| |
241 | 241 |
| |
242 | 242 |
| |
243 |
| - | |
244 |
| - | |
245 |
| - | |
246 |
| - | |
247 |
| - | |
248 |
| - | |
249 |
| - | |
| 243 | + | |
| 244 | + | |
250 | 245 |
| |
251 | 246 |
| |
252 | 247 |
| |
253 |
| - | |
254 |
| - | |
| 248 | + | |
| 249 | + | |
255 | 250 |
| |
256 | 251 |
| |
257 | 252 |
| |
258 |
| - | |
259 |
| - | |
260 |
| - | |
261 |
| - | |
262 |
| - | |
263 |
| - | |
264 |
| - | |
265 |
| - | |
| 253 | + | |
| 254 | + | |
266 | 255 |
| |
267 | 256 |
| |
268 | 257 |
| |
| |||
271 | 260 |
| |
272 | 261 |
| |
273 | 262 |
| |
274 |
| - | |
| 263 | + | |
275 | 264 |
| |
276 | 265 |
| |
277 | 266 |
| |
278 | 267 |
| |
| 268 | + | |
| 269 | + | |
| 270 | + | |
| 271 | + | |
| 272 | + | |
| 273 | + | |
| 274 | + | |
| 275 | + | |
| 276 | + | |
| 277 | + | |
| 278 | + | |
| 279 | + | |
| 280 | + | |
| 281 | + | |
| 282 | + | |
| 283 | + | |
| 284 | + | |
| 285 | + | |
| 286 | + | |
279 | 287 |
| |
280 | 288 |
| |
281 | 289 |
| |
|
0 commit comments
Comments
(0)