Alexandre Julliard : msvcrt: Use the msvcrt allocation functions internally.
Alexandre Julliard
julliard at winehq.org
Wed Nov 18 15:48:00 CST 2020
Module: wine
Branch: master
Commit: 871d9863bc2d1c9406b47aa644974768d5c6d2c4
URL: https://source.winehq.org/git/wine.git/?a=commit;h=871d9863bc2d1c9406b47aa644974768d5c6d2c4
Author: Alexandre Julliard <julliard at winehq.org>
Date: Wed Nov 18 16:02:06 2020 +0100
msvcrt: Use the msvcrt allocation functions internally.
Signed-off-by: Alexandre Julliard <julliard at winehq.org>
---
dlls/msvcrt/locale.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/dlls/msvcrt/locale.c b/dlls/msvcrt/locale.c
index fda3d11b86d..37c4afcf786 100644
--- a/dlls/msvcrt/locale.c
+++ b/dlls/msvcrt/locale.c
@@ -708,7 +708,7 @@ int CDECL __crtLCMapStringA(
if (!in_len) return 0;
if (in_len > ARRAY_SIZE(buf_in))
{
- in = malloc(in_len * sizeof(WCHAR));
+ in = MSVCRT_malloc(in_len * sizeof(WCHAR));
if (!in) return 0;
}
@@ -726,7 +726,7 @@ int CDECL __crtLCMapStringA(
out_len = r;
if (r > ARRAY_SIZE(buf_out))
{
- out = malloc(r * sizeof(WCHAR));
+ out = MSVCRT_malloc(r * sizeof(WCHAR));
if (!out)
{
r = 0;
@@ -740,8 +740,8 @@ int CDECL __crtLCMapStringA(
r = WideCharToMultiByte(codepage, 0, out, out_len, dst, dstlen, NULL, NULL);
done:
- if (in != buf_in) free(in);
- if (out != buf_out) free(out);
+ if (in != buf_in) MSVCRT_free(in);
+ if (out != buf_out) MSVCRT_free(out);
return r;
}
More information about the wine-cvs
mailing list