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.
This commit is contained in:
parent
c80a08d6bf
commit
3ae9258f9e
|
@ -104,6 +104,7 @@ FcDirCacheUnlink (const FcChar8 *dir, FcConfig *config)
|
||||||
if (!cache_hashed)
|
if (!cache_hashed)
|
||||||
break;
|
break;
|
||||||
(void) unlink ((char *) cache_hashed);
|
(void) unlink ((char *) cache_hashed);
|
||||||
|
FcStrFree (cache_hashed);
|
||||||
}
|
}
|
||||||
FcStrListDone (list);
|
FcStrListDone (list);
|
||||||
/* return FcFalse if something went wrong */
|
/* return FcFalse if something went wrong */
|
||||||
|
|
Loading…
Reference in New Issue