fontconfig: Branch 'master'

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



 test/test-issue107.c |    9 ++++++---
 1 file changed, 6 insertions(+), 3 deletions(-)

New commits:
commit e261e31731c631cbe6c1df8280d3088df5762375
Author: Akira TAGOH <akira@xxxxxxxxx>
Date:   Tue Jul 23 04:18:59 2019 +0000

    Clean up temporary directory for tests

diff --git a/test/test-issue107.c b/test/test-issue107.c
index eeb3d68..bc2ee25 100644
--- a/test/test-issue107.c
+++ b/test/test-issue107.c
@@ -179,8 +179,8 @@ int
 main(void)
 {
     FcConfig *cfg = FcConfigCreate ();
-    char *basedir, template[512] = "/tmp/fc107-XXXXXX";
-    char *sysroot, systempl[512] = "/tmp/fc107-XXXXXX";
+    char *basedir = NULL, template[512] = "/tmp/fc107-XXXXXX";
+    char *sysroot = NULL, systempl[512] = "/tmp/fc107-XXXXXX";
     FcChar8 *d = NULL, *dd = NULL;
     FcCache *c = NULL;
     const FcChar8 *doc = ""
@@ -257,7 +257,10 @@ main(void)
     retval = 0;
 bail:
     fprintf (stderr, "Cleaning up\n");
-    unlink_dirs (basedir);
+    if (basedir)
+	unlink_dirs (basedir);
+    if (sysroot)
+	unlink_dirs (sysroot);
     if (dd)
 	free (dd);
     FcConfigDestroy (cfg);
_______________________________________________
Fontconfig mailing list
Fontconfig@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/fontconfig




[Index of Archives]     [Fedora Fonts]     [Fedora Users]     [Fedora Cloud]     [Kernel]     [Fedora Packaging]     [Fedora Desktop]     [PAM]     [Gimp Graphics Editor]     [Yosemite News]

  Powered by Linux