summaryrefslogtreecommitdiff
path: root/src/peerinfo-tool
diff options
context:
space:
mode:
Diffstat (limited to 'src/peerinfo-tool')
-rw-r--r--src/peerinfo-tool/gnunet-peerinfo.c2
-rw-r--r--src/peerinfo-tool/gnunet-peerinfo_plugins.c2
2 files changed, 2 insertions, 2 deletions
diff --git a/src/peerinfo-tool/gnunet-peerinfo.c b/src/peerinfo-tool/gnunet-peerinfo.c
index e62df3047..f4a9d3aa6 100644
--- a/src/peerinfo-tool/gnunet-peerinfo.c
+++ b/src/peerinfo-tool/gnunet-peerinfo.c
@@ -364,7 +364,7 @@ print_peer_info (void *cls, const struct GNUNET_PeerIdentity *peer,
GNUNET_i2s_full (peer));
return;
}
- pc = GNUNET_malloc (sizeof (struct PrintContext));
+ pc = GNUNET_new (struct PrintContext);
GNUNET_CONTAINER_DLL_insert (pc_head,
pc_tail,
pc);
diff --git a/src/peerinfo-tool/gnunet-peerinfo_plugins.c b/src/peerinfo-tool/gnunet-peerinfo_plugins.c
index 29dc4d017..37553f2f7 100644
--- a/src/peerinfo-tool/gnunet-peerinfo_plugins.c
+++ b/src/peerinfo-tool/gnunet-peerinfo_plugins.c
@@ -109,7 +109,7 @@ GPI_plugins_load (const struct GNUNET_CONFIGURATION_Handle *cfg)
GNUNET_log (GNUNET_ERROR_TYPE_INFO, _("Loading `%s' transport plugin\n"),
pos);
GNUNET_asprintf (&libname, "libgnunet_plugin_transport_%s", pos);
- plug = GNUNET_malloc (sizeof (struct TransportPlugin));
+ plug = GNUNET_new (struct TransportPlugin);
plug->short_name = GNUNET_strdup (pos);
plug->lib_name = libname;
plug->env.cfg = cfg;