return;
}
pc->peer = *peer;
- GNUNET_HELLO_iterate_addresses (hello, GNUNET_NO, &count_address, pc);
- GNUNET_HELLO_iterate_addresses (hello, GNUNET_NO, &compose_uri, pc);
+ if (NULL != hello)
+ {
+ GNUNET_HELLO_iterate_addresses (hello, GNUNET_NO, &count_address, pc);
+ GNUNET_HELLO_iterate_addresses (hello, GNUNET_NO, &compose_uri, pc);
+ }
printf ("%s\n", pc->uri);
- GNUNET_free (pc->uri);
- GNUNET_free (pc);
}
struct GNUNET_PEERINFO_HelloAddressParsingContext
/* WARNING: this adds the address from URI WITHOUT verification! */
GNUNET_PEERINFO_add_peer (peerinfo, hello);
+ GNUNET_free (hello);
}
static struct GNUNET_TIME_Relative
struct PrintContext *pc;
char *pkey;
ssize_t l, pl;
+
pc = GNUNET_malloc (sizeof (struct PrintContext));
pkey = GNUNET_CRYPTO_rsa_public_key_to_string (&pub);
pl = strlen ("gnunet://hello/");
GNUNET_PEERINFO_iterate (peerinfo, &pid,
GNUNET_TIME_relative_multiply (GNUNET_TIME_UNIT_SECONDS, 5),
print_my_uri, pc);
+ GNUNET_free (pc->uri);
+ GNUNET_free (pc);
}
}
}