Skip to content

Commit

Permalink
Release unknown after QI
Browse files Browse the repository at this point in the history
  • Loading branch information
shmuelie committed Aug 29, 2024
1 parent 330ff90 commit a7178d5
Showing 1 changed file with 1 addition and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ public unsafe HRESULT CreateInstance(void* pUnkOuter, Guid* riid, void** ppvObje
else
{
HRESULT hr = (HRESULT)Marshal.QueryInterface(unknown, ref *riid, out nint ppv);
Marshal.Release(unknown);
if (hr.Failed)
{
return hr;
Expand Down

0 comments on commit a7178d5

Please sign in to comment.