-simplify
[oweals/gnunet.git] / src / namestore / test_namestore_api_create.c
index 583f78a01dd84eb95ca17cc806069803f73548c3..8bdf1338d9a9839a35acf2553d0fb0774279267c 100644 (file)
@@ -24,7 +24,7 @@
 #include "platform.h"
 #include "gnunet_common.h"
 #include "gnunet_namestore_service.h"
-#include "gnunet_testing_lib-new.h"
+#include "gnunet_testing_lib.h"
 #include "namestore.h"
 #include "gnunet_signatures.h"
 
@@ -84,6 +84,7 @@ endbadly (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
   if (privkey != NULL)
     GNUNET_CRYPTO_rsa_key_free (privkey);
   privkey = NULL;
+  GNUNET_free_non_null (s_name);
   res = 1;
 }
 
@@ -99,6 +100,7 @@ end (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
   GNUNET_free ((void *) s_first_record->data);
   GNUNET_free (s_first_record);
   GNUNET_free_non_null (s_second_record);
+  GNUNET_free_non_null (s_name);
   if (privkey != NULL)
     GNUNET_CRYPTO_rsa_key_free (privkey);
   privkey = NULL;
@@ -361,7 +363,7 @@ run (void *cls,
   GNUNET_CRYPTO_rsa_key_get_public(privkey, &pubkey);
 
   /* create record */
-  s_name = "dummy.dummy.gnunet";
+  s_name = GNUNET_NAMESTORE_normalize_string ("DUMMY.dummy.gnunet");
   s_first_record = create_record (1);
 
   rd_ser_len = GNUNET_NAMESTORE_records_get_size(1, s_first_record);