fix
authorChristian Grothoff <christian@grothoff.org>
Fri, 7 May 2010 08:56:31 +0000 (08:56 +0000)
committerChristian Grothoff <christian@grothoff.org>
Fri, 7 May 2010 08:56:31 +0000 (08:56 +0000)
src/fs/test_fs_list_indexed.c
src/fs/test_fs_publish.c

index 280ca11eeb8811242c6d23b5138caf7e46a0df63..c938162f8a22777baae6c713de6c35dd75e6e24c 100644 (file)
@@ -345,10 +345,16 @@ main (int argc, char *argv[])
                      "nohelp", options, &run, NULL);
   stop_arm (&p1);
   GNUNET_DISK_directory_remove ("/tmp/gnunet-test-fs-list-indexed/");
-  GNUNET_DISK_directory_remove (fn1);
-  GNUNET_free_non_null (fn1);
-  GNUNET_DISK_directory_remove (fn2);
-  GNUNET_free_non_null (fn2);
+  if (fn1 != NULL)
+    {
+      GNUNET_DISK_directory_remove (fn1);
+      GNUNET_free (fn1);
+    }
+  if (fn2 != NULL)
+    {
+      GNUNET_DISK_directory_remove (fn2);
+      GNUNET_free (fn2);
+    }
   return err;
 }
 
index 7df42a26f7246b129747162bffc34f0d26559c82..f3cbeb7bb71ea821a7eb35430621d22c89a6fce2 100644 (file)
@@ -330,10 +330,16 @@ main (int argc, char *argv[])
                      "nohelp", options, &run, NULL);
   stop_arm (&p1);
   GNUNET_DISK_directory_remove ("/tmp/gnunet-test-fs-publish/");
-  GNUNET_DISK_directory_remove (fn1);
-  GNUNET_free_non_null (fn1);
-  GNUNET_DISK_directory_remove (fn2);
-  GNUNET_free_non_null (fn2);
+  if (fn1 != NULL)
+    {
+      GNUNET_DISK_directory_remove (fn1);
+      GNUNET_free (fn1);
+    }
+  if (fn2 != NULL)
+    {
+      GNUNET_DISK_directory_remove (fn2);
+      GNUNET_free (fn2);
+    }
   return err;
 }