From 1a0391c099e0fe03a4c877c5f5e05664737306a6 Mon Sep 17 00:00:00 2001 From: Akira TAGOH Date: Tue, 23 Jul 2019 10:54:36 +0000 Subject: [PATCH] Fix memory leaks --- fc-cache/fc-cache.c | 2 ++ src/fcxml.c | 1 + 2 files changed, 3 insertions(+) diff --git a/fc-cache/fc-cache.c b/fc-cache/fc-cache.c index 1866bd7..091eed4 100644 --- a/fc-cache/fc-cache.c +++ b/fc-cache/fc-cache.c @@ -187,6 +187,8 @@ scanDirs (FcStrList *list, FcConfig *config, FcBool force, FcBool really_force, ret++; break; } + FcStrFree (rooted_dir); + rooted_dir = NULL; continue; } diff --git a/src/fcxml.c b/src/fcxml.c index 1591c5a..2e26e77 100644 --- a/src/fcxml.c +++ b/src/fcxml.c @@ -1379,6 +1379,7 @@ _get_real_path_from_prefix(FcConfigParse *parse, const FcChar8 *path, const FcCh if (parent) { retval = FcStrBuildFilename (parent, path, NULL); + FcStrFree (parent); } else {