diff options
Diffstat (limited to 'src/rps/gnunet-service-rps_custommap.c')
-rw-r--r-- | src/rps/gnunet-service-rps_custommap.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/rps/gnunet-service-rps_custommap.c b/src/rps/gnunet-service-rps_custommap.c index 064192d08..aef081a00 100644 --- a/src/rps/gnunet-service-rps_custommap.c +++ b/src/rps/gnunet-service-rps_custommap.c | |||
@@ -128,7 +128,9 @@ CustomPeerMap_put (const struct CustomPeerMap *c_peer_map, | |||
128 | *index = CustomPeerMap_size (c_peer_map); | 128 | *index = CustomPeerMap_size (c_peer_map); |
129 | p = GNUNET_new (struct GNUNET_PeerIdentity); | 129 | p = GNUNET_new (struct GNUNET_PeerIdentity); |
130 | *p = *peer; | 130 | *p = *peer; |
131 | GNUNET_CONTAINER_multipeermap_put (c_peer_map->peer_map, peer, index, | 131 | GNUNET_assert (p != peer); |
132 | GNUNET_assert (0 == memcmp (p, peer, sizeof(struct GNUNET_PeerIdentity))); | ||
133 | GNUNET_CONTAINER_multipeermap_put (c_peer_map->peer_map, p, index, | ||
132 | GNUNET_CONTAINER_MULTIHASHMAPOPTION_UNIQUE_FAST); | 134 | GNUNET_CONTAINER_MULTIHASHMAPOPTION_UNIQUE_FAST); |
133 | GNUNET_CONTAINER_multihashmap32_put (c_peer_map->hash_map, *index, p, | 135 | GNUNET_CONTAINER_multihashmap32_put (c_peer_map->hash_map, *index, p, |
134 | GNUNET_CONTAINER_MULTIHASHMAPOPTION_UNIQUE_FAST); | 136 | GNUNET_CONTAINER_MULTIHASHMAPOPTION_UNIQUE_FAST); |
@@ -218,7 +220,6 @@ CustomPeerMap_remove_peer (const struct CustomPeerMap *c_peer_map, | |||
218 | *last_index = *index; | 220 | *last_index = *index; |
219 | } | 221 | } |
220 | GNUNET_free (index); | 222 | GNUNET_free (index); |
221 | GNUNET_free (p); | ||
222 | GNUNET_assert (GNUNET_CONTAINER_multihashmap32_size (c_peer_map->hash_map) == | 223 | GNUNET_assert (GNUNET_CONTAINER_multihashmap32_size (c_peer_map->hash_map) == |
223 | GNUNET_CONTAINER_multipeermap_size (c_peer_map->peer_map)); | 224 | GNUNET_CONTAINER_multipeermap_size (c_peer_map->peer_map)); |
224 | return GNUNET_OK; | 225 | return GNUNET_OK; |