Added missing result check
This commit is contained in:
parent
11c28326aa
commit
2f0252a33f
@ -86,13 +86,14 @@ static int CredWrite()
|
|||||||
#ifdef _DEBUG
|
#ifdef _DEBUG
|
||||||
{
|
{
|
||||||
eap::credentials_pap cred_stored(g_module);
|
eap::credentials_pap cred_stored(g_module);
|
||||||
dwResult = cred_stored.retrieve(target_name.c_str(), &pEapError);
|
if ((dwResult = cred_stored.retrieve(target_name.c_str(), &pEapError)) != ERROR_SUCCESS) {
|
||||||
if (pEapError) {
|
if (pEapError) {
|
||||||
OutputDebugStr(_T("%ls (error %u)\n"), pEapError->pRootCauseString, pEapError->dwWinError);
|
OutputDebugStr(_T("%ls (error %u)\n"), pEapError->pRootCauseString, pEapError->dwWinError);
|
||||||
g_module.free_error_memory(pEapError);
|
g_module.free_error_memory(pEapError);
|
||||||
pEapError = NULL;
|
pEapError = NULL;
|
||||||
} else
|
} else
|
||||||
OutputDebugStr(_T("Reading credentials failed (error %u).\n"), dwResult);
|
OutputDebugStr(_T("Reading credentials failed (error %u).\n"), dwResult);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
if ((dwResult = cred.store(target_name.c_str(), &pEapError)) != ERROR_SUCCESS) {
|
if ((dwResult = cred.store(target_name.c_str(), &pEapError)) != ERROR_SUCCESS) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user