From: Patrick Lam Date: Fri, 3 Feb 2006 23:47:37 +0000 (+0000) Subject: Fix double free in error case. X-Git-Tag: fc-2_3_94~45 X-Git-Url: https://git.wh0rd.org/?a=commitdiff_plain;h=1af0f5741a95eed6f3a54140c360e0422fd13f62;p=fontconfig.git Fix double free in error case. --- 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;