mlang: fix memory leak in error path (found by Smatch).
Lionel Debroux
lionel_debroux at yahoo.fr
Mon Sep 24 07:17:34 CDT 2007
---
dlls/mlang/mlang.c | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
diff --git a/dlls/mlang/mlang.c b/dlls/mlang/mlang.c
index eb14ad0..c6274c5 100644
--- a/dlls/mlang/mlang.c
+++ b/dlls/mlang/mlang.c
@@ -635,9 +635,10 @@ HRESULT WINAPI ConvertINetString(
pDstStrW = HeapAlloc(GetProcessHeap(), 0, cDstSizeW * sizeof(WCHAR));
hr = ConvertINetMultiByteToUnicode(pdwMode, dwSrcEncoding, pSrcStr, pcSrcSize, pDstStrW, &cDstSizeW);
if (hr != S_OK)
- return hr;
+ goto cleanup;
hr = ConvertINetUnicodeToMultiByte(pdwMode, dwDstEncoding, pDstStrW, &cDstSizeW, pDstStr, pcDstSize);
+cleanup:
HeapFree(GetProcessHeap(), 0, pDstStrW);
return hr;
}
--
1.5.3.1
--------------090405070906050101060008--
More information about the wine-patches
mailing list