Commit 8ae0d17d authored by Lionel_Debroux's avatar Lionel_Debroux Committed by Alexandre Julliard

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

parent 03f3a40a
......@@ -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;
}
......
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