Commit 3ae9258f authored by Keith Packard's avatar Keith Packard
Browse files

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.
parent c80a08d6
......@@ -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 */
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment