Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[NETSHELL] Property page needs to call ReleaseWriteLock #5881

Merged
merged 1 commit into from Nov 4, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
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
learn-more marked this conversation as resolved.
Show resolved Hide resolved
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