summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPatrick Lam <plam@MIT.EDU>2006-02-03 23:47:37 +0000
committerPatrick Lam <plam@MIT.EDU>2006-02-03 23:47:37 +0000
commit1af0f5741a95eed6f3a54140c360e0422fd13f62 (patch)
treeba7bca3e7d15bbc11b7db170a98ff58776caf19f
parent80ba0571f3bfdee854d6e69f55664f552f4b75a3 (diff)
Fix double free in error case.
-rw-r--r--ChangeLog5
-rw-r--r--src/fccache.c2
2 files changed, 6 insertions, 1 deletions
diff --git a/ChangeLog b/ChangeLog
index 0c63b805..0a8dbb91 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2006-02-03 Patrick Lam <plam@mit.edu>
+ * src/fccache.c (FcDirCacheUnlink):
+
+ Fix double free in error case.
+
2006-01-31 Behdad Esfabod <behdad@cs.utoronto.edu>
Stephan Kulow <coolo@suse.de>
reviewed by: plam
diff --git a/src/fccache.c b/src/fccache.c
index 886e6525..0de020ce 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;