From 1af0f5741a95eed6f3a54140c360e0422fd13f62 Mon Sep 17 00:00:00 2001 From: Patrick Lam Date: Fri, 3 Feb 2006 23:47:37 +0000 Subject: [PATCH] Fix double free in error case. --- ChangeLog | 5 +++++ src/fccache.c | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index 0c63b80..0a8dbb9 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2006-02-03 Patrick Lam + * src/fccache.c (FcDirCacheUnlink): + + Fix double free in error case. + 2006-01-31 Behdad Esfabod Stephan Kulow reviewed by: plam diff --git a/src/fccache.c b/src/fccache.c index 886e652..0de020c 100644 --- a/src/fccache.c +++ b/src/fccache.c @@ -743,7 +743,6 @@ FcDirCacheUnlink (const FcChar8 *dir, FcConfig *config) } } while (strcmp (name_buf, cache_file) != 0); - FcStrFree ((FcChar8 *)cache_file); close (fd); if (stat ((char *) cache_hashed, &cache_stat) == 0 && @@ -753,6 +752,7 @@ FcDirCacheUnlink (const FcChar8 *dir, FcConfig *config) goto bail; } + FcStrFree ((FcChar8 *)cache_file); FcStrFree ((FcChar8 *)cache_hashed); return FcTrue; -- 2.39.5