summaryrefslogtreecommitdiff
path: root/src/peerinfo/peerinfo_api.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/peerinfo/peerinfo_api.c')
-rw-r--r--src/peerinfo/peerinfo_api.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/peerinfo/peerinfo_api.c b/src/peerinfo/peerinfo_api.c
index 794060487..716802389 100644
--- a/src/peerinfo/peerinfo_api.c
+++ b/src/peerinfo/peerinfo_api.c
@@ -201,7 +201,7 @@ GNUNET_PEERINFO_connect (const struct GNUNET_CONFIGURATION_Handle *cfg)
{
struct GNUNET_PEERINFO_Handle *h;
- h = GNUNET_malloc (sizeof (struct GNUNET_PEERINFO_Handle));
+ h = GNUNET_new (struct GNUNET_PEERINFO_Handle);
h->client = GNUNET_CLIENT_connect ("peerinfo", cfg);
h->cfg = cfg;
return h;
@@ -708,7 +708,7 @@ GNUNET_PEERINFO_iterate (struct GNUNET_PEERINFO_Handle *h,
struct GNUNET_PEERINFO_IteratorContext *ic;
struct GNUNET_PEERINFO_AddContext *ac;
- ic = GNUNET_malloc (sizeof (struct GNUNET_PEERINFO_IteratorContext));
+ ic = GNUNET_new (struct GNUNET_PEERINFO_IteratorContext);
if (NULL == peer)
{
LOG (GNUNET_ERROR_TYPE_DEBUG,