mlang: Fix memory leaks in error path (found by Smatch).

This commit is contained in:
Lionel_Debroux 2007-09-26 14:27:32 +02:00 committed by Alexandre Julliard
parent 03f3a40a03
commit 8ae0d17d59
1 changed files with 2 additions and 3 deletions

View File

@ -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;
}