diff options
| author | Daniel Eklöf <daniel@ekloef.se> | 2025-07-11 14:47:51 +0000 |
|---|---|---|
| committer | Daniel Eklöf <daniel@ekloef.se> | 2025-07-11 14:47:51 +0000 |
| commit | 693aefa96a74b0e4b9117a0c4ffe8c95b35b0c8b (patch) | |
| tree | f9f3748a37a498c6049cde9edf39544234118d36 | |
| parent | issue template: compositor version -> compositor name and version (diff) | |
config: silence valgrind-detected leak in config_font_parse()
| -rw-r--r-- | config.c | 4 |
1 files changed, 3 insertions, 1 deletions
@@ -3956,9 +3956,10 @@ config_font_parse(const char *pattern, struct config_font *font) * both "size" and "pixelsize" being set, and we don't know * which one takes priority. */ + FcConfig *fc_conf = FcConfigCreate(); FcPattern *pat_copy = FcPatternDuplicate(pat); if (pat_copy == NULL || - !FcConfigSubstitute(NULL, pat_copy, FcMatchPattern)) + !FcConfigSubstitute(fc_conf, pat_copy, FcMatchPattern)) { LOG_WARN("%s: failed to do config substitution", pattern); } else { @@ -3967,6 +3968,7 @@ config_font_parse(const char *pattern, struct config_font *font) } FcPatternDestroy(pat_copy); + FcConfigDestroy(fc_conf); if (have_pt_size != FcResultMatch && have_px_size != FcResultMatch) pt_size = 8.0; |
