- fixing channel functions
[oweals/gnunet.git] / src / ats / test_ats_api_common.c
index 865268c2ecc329c1ee749b5bc86fd68bfb9e8161..44d6274243dad7d5faabefaa3a4477f319d02c6d 100644 (file)
@@ -47,9 +47,10 @@ create_test_address (struct Test_Address *dest, char * plugin, void *session, vo
 void
 free_test_address (struct Test_Address *dest)
 {
-  GNUNET_free (dest->plugin);
-  if (NULL != dest->addr)
-    GNUNET_free (dest->addr);
+  GNUNET_free_non_null (dest->plugin);
+  dest->plugin = NULL;
+  GNUNET_free_non_null (dest->addr);
+  dest->addr = NULL;
 }
 
 int
@@ -68,13 +69,13 @@ compare_addresses (const struct GNUNET_HELLO_Address *address1, void *session1,
   }
   if (address1->address_length != address2->address_length)
   {
-      GNUNET_log (GNUNET_ERROR_TYPE_ERROR, "Suggestion with invalid address length'\n");
+      GNUNET_log (GNUNET_ERROR_TYPE_ERROR, "Suggestion with invalid address length\n");
       return GNUNET_SYSERR;
 
   }
   else if (0 != memcmp (address1->address, address2->address, address2->address_length))
   {
-      GNUNET_log (GNUNET_ERROR_TYPE_ERROR, "Suggestion with invalid address'\n");
+      GNUNET_log (GNUNET_ERROR_TYPE_ERROR, "Suggestion with invalid address\n");
       return GNUNET_SYSERR;
   }
   if (session1 != session2)