Commit 644dedb7 authored by Juan Lang's avatar Juan Lang Committed by Alexandre Julliard

crypt32: Free memory on all paths.

parent 81a382ac
......@@ -839,6 +839,12 @@ BOOL WINAPI CertStrToNameW(DWORD dwCertEncodingType, LPCWSTR pszX500,
*ppszError = NULL;
ret = CryptEncodeObjectEx(dwCertEncodingType, X509_NAME, &info,
0, NULL, pbEncoded, pcbEncoded);
}
else
{
SetLastError(error);
ret = FALSE;
}
for (i = 0; i < info.cRDN; i++)
{
DWORD j;
......@@ -848,12 +854,6 @@ BOOL WINAPI CertStrToNameW(DWORD dwCertEncodingType, LPCWSTR pszX500,
CryptMemFree(info.rgRDN[i].rgRDNAttr);
}
CryptMemFree(info.rgRDN);
}
else
{
SetLastError(error);
ret = FALSE;
}
return ret;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment