Commit e261e317 authored by Akira TAGOH's avatar Akira TAGOH

Clean up temporary directory for tests

parent 36f46ba7
...@@ -179,8 +179,8 @@ int ...@@ -179,8 +179,8 @@ int
main(void) main(void)
{ {
FcConfig *cfg = FcConfigCreate (); FcConfig *cfg = FcConfigCreate ();
char *basedir, template[512] = "/tmp/fc107-XXXXXX"; char *basedir = NULL, template[512] = "/tmp/fc107-XXXXXX";
char *sysroot, systempl[512] = "/tmp/fc107-XXXXXX"; char *sysroot = NULL, systempl[512] = "/tmp/fc107-XXXXXX";
FcChar8 *d = NULL, *dd = NULL; FcChar8 *d = NULL, *dd = NULL;
FcCache *c = NULL; FcCache *c = NULL;
const FcChar8 *doc = "" const FcChar8 *doc = ""
...@@ -257,7 +257,10 @@ main(void) ...@@ -257,7 +257,10 @@ main(void)
retval = 0; retval = 0;
bail: bail:
fprintf (stderr, "Cleaning up\n"); fprintf (stderr, "Cleaning up\n");
unlink_dirs (basedir); if (basedir)
unlink_dirs (basedir);
if (sysroot)
unlink_dirs (sysroot);
if (dd) if (dd)
free (dd); free (dd);
FcConfigDestroy (cfg); FcConfigDestroy (cfg);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment