Haoyang Chen : gdi32: Fix a memory leak.
Alexandre Julliard
julliard at winehq.org
Tue Oct 26 09:40:29 CDT 2021
Module: wine
Branch: stable
Commit: 328d834ad95f6f1ef7eab445cb8836ff8dfba8e2
URL: https://source.winehq.org/git/wine.git/?a=commit;h=328d834ad95f6f1ef7eab445cb8836ff8dfba8e2
Author: Haoyang Chen <chenhaoyang at uniontech.com>
Date: Thu May 13 14:17:57 2021 +0800
gdi32: Fix a memory leak.
Signed-off-by: Haoyang Chen <chenhaoyang at uniontech.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>
(cherry picked from commit 4b9c4e42014759e4f6ebb6e588a9f1113a256d61)
Signed-off-by: Michael Stefaniuc <mstefani at winehq.org>
---
dlls/gdi32/freetype.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/dlls/gdi32/freetype.c b/dlls/gdi32/freetype.c
index d94643b4451..4f5d4725876 100644
--- a/dlls/gdi32/freetype.c
+++ b/dlls/gdi32/freetype.c
@@ -1538,9 +1538,10 @@ static UINT parse_aa_pattern( FcPattern *pattern )
static FcPattern *create_family_pattern( const char *name, FcPattern **cached )
{
- FcPattern *ret = NULL, *tmp, *pattern = pFcPatternCreate();
+ FcPattern *ret = NULL, *tmp, *pattern;
FcResult result;
if (*cached) return *cached;
+ pattern = pFcPatternCreate();
pFcPatternAddString( pattern, FC_FAMILY, (const FcChar8 *)name );
pFcPatternAddString( pattern, FC_NAMELANG, (const FcChar8 *)"en-us" );
pFcPatternAddString( pattern, FC_PRGNAME, (const FcChar8 *)"wine" );
More information about the wine-cvs
mailing list