Commit ca4561c
committed
ext/com_dotnet: release the held IUnknown in com_get_active_object()
The cleanup block guarded on `unk` but released `obj`. On a successful
GetActiveObject() this released the IDispatch proxy twice and leaked the
IUnknown; on a QueryInterface failure `obj` is still NULL while `unk` is
live, so the same line released NULL through a NULL vtable and crashed
instead of throwing. Release `unk` so each interface pointer is released
exactly once and the failure path no longer crashes.
Closes GH-223781 parent df1250d commit ca4561c
1 file changed
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
321 | 321 | | |
322 | 322 | | |
323 | 323 | | |
324 | | - | |
| 324 | + | |
325 | 325 | | |
326 | 326 | | |
327 | 327 | | |
| |||
0 commit comments