fix
[oweals/gnunet.git] / src / gns / gnunet-service-gns_resolver.c
index 80a2785b86d0ed3842a87a3423f8fe7f379ee380..6a07f6d940bf3b87e5c45fdce9b5ef971946d405 100644 (file)
@@ -33,7 +33,7 @@
 #include "gnunet_dns_service.h"
 #include "gnunet_resolver_service.h"
 #include "gnunet_dnsparser_lib.h"
-#include "../dns/dnsparser.h"
+#include "gns_protocol.h"
 #include "gnunet_gns_service.h"
 #include "block_gns.h"
 #include "gns.h"
@@ -309,9 +309,10 @@ process_pseu_result (struct GetPseuAuthorityHandle* gph, char* name)
     GNUNET_CRYPTO_rsa_key_free (gph->key);
     GNUNET_CONTAINER_DLL_remove (gph_head, gph_tail, gph);
     GNUNET_free (gph);
+    return;
   }
-  else
-    memcpy (gph->test_name, name, strlen(name)+1);
+  
+  memcpy (gph->test_name, name, strlen(name)+1);
 
   GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
               "GNS_AUTO_PSEU: Checking %s for collision in NS\n",
@@ -589,9 +590,7 @@ start_shorten (struct AuthorityChain *auth,
   struct GetPseuAuthorityHandle *gph;
   struct GNUNET_CRYPTO_RsaPublicKeyBinaryEncoded pkey;
   struct GNUNET_CRYPTO_RsaPrivateKeyBinaryEncoded *pb_key;
-
-  gph = GNUNET_malloc (sizeof (struct GetPseuAuthorityHandle));
-
+  
   GNUNET_CRYPTO_rsa_key_get_public (key, &pkey);
   pb_key = GNUNET_CRYPTO_rsa_encode_key (key);