From 7aa06c2b3ec477136f5821f3aff406ec9cb290ad Mon Sep 17 00:00:00 2001 From: Christian Grothoff Date: Sat, 27 Aug 2016 16:33:40 +0000 Subject: [PATCH] -fix leak --- src/psyc/psyc_api.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/psyc/psyc_api.c b/src/psyc/psyc_api.c index ca72a44c0..f74930237 100644 --- a/src/psyc/psyc_api.c +++ b/src/psyc/psyc_api.c @@ -720,10 +720,10 @@ GNUNET_PSYC_master_start (const struct GNUNET_CONFIGURATION_Handle *cfg, GNUNET_PSYC_MessagePartCallback message_part_cb, void *cls) { - struct GNUNET_PSYC_Master *mst = GNUNET_malloc (sizeof (*mst)); + struct GNUNET_PSYC_Master *mst = GNUNET_new (struct GNUNET_PSYC_Master); struct GNUNET_PSYC_Channel *chn = &mst->chn; + struct MasterStartRequest *req; - struct MasterStartRequest *req = GNUNET_malloc (sizeof (*req)); chn->connect_env = GNUNET_MQ_msg (req, GNUNET_MESSAGE_TYPE_PSYC_MASTER_START); req->channel_key = *channel_key; -- 2.25.1