]> git.wh0rd.org Git - fontconfig.git/commitdiff
Don't leak header in non-error case (Coverity defect #1825).
authorPatrick Lam <plam@MIT.EDU>
Mon, 10 Apr 2006 16:12:55 +0000 (16:12 +0000)
committerPatrick Lam <plam@MIT.EDU>
Mon, 10 Apr 2006 16:12:55 +0000 (16:12 +0000)
reviewed by: plam

ChangeLog
src/fccache.c

index 6d1a348f576ef952cc5ae862bc11284ef2b84e40..c1185f6d4bbe0e1b2f4c4bdab49adc171b239e12 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2006-04-10  Frederic Crozat  <fcrozat@mandriva.com>
+       reviewed by: plam
+       
+       * src/fccache.c: (FcGlobalCacheSave):
+       Don't leak header in non-error case (Coverity defect #1825).
+
 2006-04-10  Frederic Crozat  <fcrozat@mandriva.com>
        reviewed by: plam
 
index de95f363e8e19bf93a907e4cea78c57d9285c468..042439ee342cba14245e6bc87cb56a5826b75957 100644 (file)
@@ -501,6 +501,8 @@ FcGlobalCacheSave (FcGlobalCache    *cache,
     if (!FcCacheWriteString (fd, header))
        goto bail4;
 
+    free (header);
+
     for (dir = cache->dirs; dir; dir = dir->next)
     {
        int i;