Skip to content

Commit

Permalink
[NETSHELL] Call ReleaseWriteLock. Fixes CORE-18349 (#5881)
Browse files Browse the repository at this point in the history
  • Loading branch information
whindsaks committed Nov 4, 2023
1 parent fa4b38d commit a6c8382
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions dll/shellext/netshell/lanconnectui.cpp
Expand Up @@ -17,6 +17,10 @@ CNetConnectionPropertyUi::~CNetConnectionPropertyUi()
if (m_pNCfg)
m_pNCfg->Uninitialize();

// Note: MSDN says we can only unlock after INetCfg::Uninitialize
if (m_NCfgLock)
m_NCfgLock->ReleaseWriteLock();

if (m_pProperties)
NcFreeNetconProperties(m_pProperties);
}
Expand Down Expand Up @@ -181,7 +185,10 @@ CNetConnectionPropertyUi::InitializeLANPropertiesUIDlg(HWND hwndDlg)

hr = pNCfg->Initialize(NULL);
if (FAILED_UNEXPECTEDLY(hr))
{
pNCfgLock->ReleaseWriteLock();
return;
}

m_pNCfg = pNCfg;
m_NCfgLock = pNCfgLock;
Expand Down

0 comments on commit a6c8382

Please sign in to comment.