mlang: Fix memory leaks in error path (found by Smatch).
This commit is contained in:
parent
03f3a40a03
commit
8ae0d17d59
|
@ -634,10 +634,9 @@ HRESULT WINAPI ConvertINetString(
|
|||
|
||||
pDstStrW = HeapAlloc(GetProcessHeap(), 0, cDstSizeW * sizeof(WCHAR));
|
||||
hr = ConvertINetMultiByteToUnicode(pdwMode, dwSrcEncoding, pSrcStr, pcSrcSize, pDstStrW, &cDstSizeW);
|
||||
if (hr != S_OK)
|
||||
return hr;
|
||||
if (hr == S_OK)
|
||||
hr = ConvertINetUnicodeToMultiByte(pdwMode, dwDstEncoding, pDstStrW, &cDstSizeW, pDstStr, pcDstSize);
|
||||
|
||||
hr = ConvertINetUnicodeToMultiByte(pdwMode, dwDstEncoding, pDstStrW, &cDstSizeW, pDstStr, pcDstSize);
|
||||
HeapFree(GetProcessHeap(), 0, pDstStrW);
|
||||
return hr;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue