From c814c301ee4dcc67eeacee9608fb716e67534356 Mon Sep 17 00:00:00 2001 From: Patrick Lam Date: Mon, 10 Apr 2006 16:12:55 +0000 Subject: [PATCH] Don't leak header in non-error case (Coverity defect #1825). reviewed by: plam --- ChangeLog | 6 ++++++ src/fccache.c | 2 ++ 2 files changed, 8 insertions(+) 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; -- 2.39.5