Skip to content

Commit 75b0ed4

Browse files
committed
ext/com_dotnet: release the held IUnknown in com_get_active_object()
The cleanup block guarded on `unk` but released `obj`, so a successful GetActiveObject() released the IDispatch proxy twice (once already under the obj guard) and never released the IUnknown it returned, leaking it. Release `unk` so each interface pointer is released exactly once.
1 parent 19f595f commit 75b0ed4

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

ext/com_dotnet/com_com.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -321,7 +321,7 @@ PHP_FUNCTION(com_get_active_object)
321321
IDispatch_Release(obj);
322322
}
323323
if (unk) {
324-
IUnknown_Release(obj);
324+
IUnknown_Release(unk);
325325
}
326326
efree(module);
327327
}

0 commit comments

Comments
 (0)