diff options
-rw-r--r-- | src/peerinfo/gnunet-service-peerinfo.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/peerinfo/gnunet-service-peerinfo.c b/src/peerinfo/gnunet-service-peerinfo.c index fe5094d79..2f1e7a3d9 100644 --- a/src/peerinfo/gnunet-service-peerinfo.c +++ b/src/peerinfo/gnunet-service-peerinfo.c | |||
@@ -446,10 +446,11 @@ add_host_to_known_hosts (const struct GNUNET_PeerIdentity *identity) | |||
446 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Adding new peer `%s'\n", GNUNET_i2s (identity)); | 446 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Adding new peer `%s'\n", GNUNET_i2s (identity)); |
447 | GNUNET_STATISTICS_update (stats, gettext_noop ("# peers known"), 1, | 447 | GNUNET_STATISTICS_update (stats, gettext_noop ("# peers known"), 1, |
448 | GNUNET_NO); | 448 | GNUNET_NO); |
449 | entry = GNUNET_malloc (sizeof (struct HostEntry)); | 449 | entry = GNUNET_new (struct HostEntry); |
450 | entry->identity = *identity; | 450 | entry->identity = *identity; |
451 | GNUNET_CONTAINER_multipeermap_put (hostmap, &entry->identity, entry, | 451 | GNUNET_assert (GNUNET_OK == |
452 | GNUNET_CONTAINER_MULTIHASHMAPOPTION_UNIQUE_ONLY); | 452 | GNUNET_CONTAINER_multipeermap_put (hostmap, &entry->identity, entry, |
453 | GNUNET_CONTAINER_MULTIHASHMAPOPTION_UNIQUE_ONLY)); | ||
453 | notify_all (entry); | 454 | notify_all (entry); |
454 | fn = get_host_filename (identity); | 455 | fn = get_host_filename (identity); |
455 | if (NULL != fn) | 456 | if (NULL != fn) |