[Fontconfig] fontconfig: Branch 'master'

Keith Packard keithp at kemper.freedesktop.org
Sun Aug 5 12:31:01 PDT 2007


 src/fccache.c |    1 +
 1 files changed, 1 insertion(+)

New commits:
diff-tree 3ae9258f9e825ed576dc315ec79009188bb422e2 (from c80a08d6bf08a27ede95035f3f02cd5abfa2cafd)
Author: Keith Packard <keithp at neko.keithp.com>
Date:   Sun Aug 5 12:31:03 2007 -0700

    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.

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, Fc
         if (!cache_hashed)
 	    break;
 	(void) unlink ((char *) cache_hashed);
+	FcStrFree (cache_hashed);
     }
     FcStrListDone (list);
     /* return FcFalse if something went wrong */


More information about the Fontconfig mailing list