From: Christian Grothoff Date: Sat, 27 Aug 2016 16:33:40 +0000 (+0000) Subject: -fix leak X-Git-Tag: initial-import-from-subversion-38251~329 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=7aa06c2b3ec477136f5821f3aff406ec9cb290ad;p=oweals%2Fgnunet.git -fix leak --- 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;