summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPatrick Lam <plam@MIT.EDU>2005-09-01 06:59:44 +0000
committerPatrick Lam <plam@MIT.EDU>2005-09-01 06:59:44 +0000
commit0230c9f88706ee4629bca625f1acd133a4cb1d9f (patch)
tree10fff9e3ce43343aae6c11246f11c07a9eb1b1b3
parent2304e38f9bc070ccd54f80187c208d93b6eeb373 (diff)
Fix embarassing attempt to free a static buffer.
-rw-r--r--src/fccache.c9
1 files changed, 3 insertions, 6 deletions
diff --git a/src/fccache.c b/src/fccache.c
index efc1cf0..ce4f49d 100644
--- a/src/fccache.c
+++ b/src/fccache.c
@@ -201,7 +201,6 @@ FcGlobalCacheLoad (FcGlobalCache *cache,
}
cache->dirs = 0;
bail0:
- free (current_arch_machine_name);
close (cache->fd);
cache->fd = -1;
return;
@@ -735,11 +734,11 @@ FcDirCacheWrite (FcFontSet *set, FcStrSet *dirs, const FcChar8 *dir)
current_arch_start = FcCacheNextOffset (lseek(fd, 0, SEEK_END));
if (!FcCacheMoveDown(fd, current_arch_start))
- goto bail2;
+ goto bail1;
current_arch_start = lseek(fd, 0, SEEK_CUR);
if (ftruncate (fd, current_arch_start) == -1)
- goto bail2;
+ goto bail1;
/* now write the address of the next offset */
truncate_to = FcCacheNextOffset (FcCacheNextOffset (current_arch_start + sizeof (FcCache)) + metadata.count) - current_arch_start;
@@ -767,10 +766,8 @@ FcDirCacheWrite (FcFontSet *set, FcStrSet *dirs, const FcChar8 *dir)
close(fd);
return FcTrue;
- bail2:
- free (header);
bail1:
- free (current_arch_machine_name);
+ free (header);
bail0:
free (current_dir_block);
bail: