From: Patrick Lam Date: Mon, 10 Apr 2006 16:12:55 +0000 (+0000) Subject: Don't leak header in non-error case (Coverity defect #1825). X-Git-Tag: fc-2_3_95~21 X-Git-Url: https://git.wh0rd.org/?a=commitdiff_plain;h=c814c301ee4dcc67eeacee9608fb716e67534356;p=fontconfig.git Don't leak header in non-error case (Coverity defect #1825). reviewed by: plam --- diff --git a/ChangeLog b/ChangeLog index 6d1a348..c1185f6 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2006-04-10 Frederic Crozat + reviewed by: plam + + * src/fccache.c: (FcGlobalCacheSave): + Don't leak header in non-error case (Coverity defect #1825). + 2006-04-10 Frederic Crozat reviewed by: plam diff --git a/src/fccache.c b/src/fccache.c index de95f36..042439e 100644 --- a/src/fccache.c +++ b/src/fccache.c @@ -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;