From 3ae9258f9e825ed576dc315ec79009188bb422e2 Mon Sep 17 00:00:00 2001 From: Keith Packard Date: Sun, 5 Aug 2007 12:31:03 -0700 Subject: [PATCH] Free temporary string in FcDirCacheUnlink (Bug #11758) In FcDirCacheUnlink(), the line cache_hashed = FcStrPlus (cache_dir, cache_base); allocates memory in cache_hashed that is never free()'d before the function exits. Reported by Ben Combee. --- src/fccache.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/fccache.c b/src/fccache.c index 3185059..9e8819c 100644 --- a/src/fccache.c +++ b/src/fccache.c @@ -104,6 +104,7 @@ FcDirCacheUnlink (const FcChar8 *dir, FcConfig *config) if (!cache_hashed) break; (void) unlink ((char *) cache_hashed); + FcStrFree (cache_hashed); } FcStrListDone (list); /* return FcFalse if something went wrong */ -- 2.39.5