- Allocate buffer large enough to contain UNIX_PATH_MAX size pathnames in case of...
[oweals/gnunet.git] / src / util / peer.c
index 08062e3643c293342e1574b46cbfed328daa742c..3e4e1712debd9340adccb4f8aeb2d7f3df123d42 100644 (file)
@@ -127,7 +127,7 @@ GNUNET_PEER_intern (const struct GNUNET_PeerIdentity *pid)
     GNUNET_array_grow (table, size, size + 16);
     for (i = ret; i < size; i++)
     {
-      table[i] = GNUNET_malloc (sizeof (struct PeerEntry));
+      table[i] = GNUNET_new (struct PeerEntry);
       table[i]->pid = i + 1;
     }
   }
@@ -144,7 +144,7 @@ GNUNET_PEER_intern (const struct GNUNET_PeerIdentity *pid)
   table[ret]->rc = 1;
   table[ret]->pid = ret;
   GNUNET_break (GNUNET_OK ==
-                GNUNET_CONTAINER_multipeermap_put (map, 
+                GNUNET_CONTAINER_multipeermap_put (map,
                                                   &table[ret]->id,
                                                    table[ret],
                                                    GNUNET_CONTAINER_MULTIHASHMAPOPTION_UNIQUE_ONLY));