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;