From: lurchi Date: Fri, 2 Feb 2018 17:38:54 +0000 (+0100) Subject: fix Null Test After Dereference X-Git-Tag: v0.11.0pre66~222 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=dccb61ecfa50bf3bbf8ff31576c45740e291096d;p=oweals%2Fgnunet.git fix Null Test After Dereference --- diff --git a/src/psyc/gnunet-service-psyc.c b/src/psyc/gnunet-service-psyc.c index cf161435a..49779ef2c 100644 --- a/src/psyc/gnunet-service-psyc.c +++ b/src/psyc/gnunet-service-psyc.c @@ -2185,13 +2185,11 @@ master_transmit_message (struct Master *mst) return; if (NULL == mst->tmit_handle) { - mst->tmit_handle = (void *) &mst->tmit_handle; - struct GNUNET_MULTICAST_OriginTransmitHandle * - tmit_handle = GNUNET_MULTICAST_origin_to_all (mst->origin, tmit_msg->id, - mst->max_group_generation, - master_transmit_notify, mst); - if (NULL != mst->tmit_handle) - mst->tmit_handle = tmit_handle; + mst->tmit_handle = GNUNET_MULTICAST_origin_to_all (mst->origin, + tmit_msg->id, + mst->max_group_generation, + &master_transmit_notify, + mst); } else { @@ -2210,12 +2208,10 @@ slave_transmit_message (struct Slave *slv) return; if (NULL == slv->tmit_handle) { - slv->tmit_handle = (void *) &slv->tmit_handle; - struct GNUNET_MULTICAST_MemberTransmitHandle * - tmit_handle = GNUNET_MULTICAST_member_to_origin (slv->member, slv->channel.tmit_head->id, - slave_transmit_notify, slv); - if (NULL != slv->tmit_handle) - slv->tmit_handle = tmit_handle; + slv->tmit_handle = GNUNET_MULTICAST_member_to_origin (slv->member, + slv->channel.tmit_head->id, + &slave_transmit_notify, + slv); } else {