valgrind found a few leaks in the new cache cleaning code.
struct stat target_stat;
dir_base = FcStrPlus (dir, "/");
struct stat target_stat;
dir_base = FcStrPlus (dir, "/");
+ if (!dir_base)
+ {
+ fprintf (stderr, "%s: out of memory\n", dir);
+ return FcFalse;
+ }
if (access ((char *) dir, W_OK|X_OK) != 0)
{
if (verbose)
printf ("%s: not cleaning unwritable cache directory\n", dir);
if (access ((char *) dir, W_OK|X_OK) != 0)
{
if (verbose)
printf ("%s: not cleaning unwritable cache directory\n", dir);
return FcTrue;
}
if (verbose)
return FcTrue;
}
if (verbose)
return FcFalse;
}
while ((ent = readdir (d)))
return FcFalse;
}
while ((ent = readdir (d)))
+ FcDirCacheUnload (cache);
FcStrFree (file_name);
}
closedir (d);
FcStrFree (file_name);
}
closedir (d);