diff options
author | lurchi <lurchi@strangeplace.net> | 2018-02-02 18:38:54 +0100 |
---|---|---|
committer | lurchi <lurchi@strangeplace.net> | 2018-02-02 18:38:54 +0100 |
commit | dccb61ecfa50bf3bbf8ff31576c45740e291096d (patch) | |
tree | c5c7255b9f424baa894bc5982e1bf01f34911e86 /src/psyc | |
parent | 4c6b07e810bd8b6245c152d6b3a161083105a165 (diff) | |
download | gnunet-dccb61ecfa50bf3bbf8ff31576c45740e291096d.tar.gz gnunet-dccb61ecfa50bf3bbf8ff31576c45740e291096d.zip |
fix Null Test After Dereference
Diffstat (limited to 'src/psyc')
-rw-r--r-- | src/psyc/gnunet-service-psyc.c | 22 |
1 files changed, 9 insertions, 13 deletions
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) | |||
2185 | return; | 2185 | return; |
2186 | if (NULL == mst->tmit_handle) | 2186 | if (NULL == mst->tmit_handle) |
2187 | { | 2187 | { |
2188 | mst->tmit_handle = (void *) &mst->tmit_handle; | 2188 | mst->tmit_handle = GNUNET_MULTICAST_origin_to_all (mst->origin, |
2189 | struct GNUNET_MULTICAST_OriginTransmitHandle * | 2189 | tmit_msg->id, |
2190 | tmit_handle = GNUNET_MULTICAST_origin_to_all (mst->origin, tmit_msg->id, | 2190 | mst->max_group_generation, |
2191 | mst->max_group_generation, | 2191 | &master_transmit_notify, |
2192 | master_transmit_notify, mst); | 2192 | mst); |
2193 | if (NULL != mst->tmit_handle) | ||
2194 | mst->tmit_handle = tmit_handle; | ||
2195 | } | 2193 | } |
2196 | else | 2194 | else |
2197 | { | 2195 | { |
@@ -2210,12 +2208,10 @@ slave_transmit_message (struct Slave *slv) | |||
2210 | return; | 2208 | return; |
2211 | if (NULL == slv->tmit_handle) | 2209 | if (NULL == slv->tmit_handle) |
2212 | { | 2210 | { |
2213 | slv->tmit_handle = (void *) &slv->tmit_handle; | 2211 | slv->tmit_handle = GNUNET_MULTICAST_member_to_origin (slv->member, |
2214 | struct GNUNET_MULTICAST_MemberTransmitHandle * | 2212 | slv->channel.tmit_head->id, |
2215 | tmit_handle = GNUNET_MULTICAST_member_to_origin (slv->member, slv->channel.tmit_head->id, | 2213 | &slave_transmit_notify, |
2216 | slave_transmit_notify, slv); | 2214 | slv); |
2217 | if (NULL != slv->tmit_handle) | ||
2218 | slv->tmit_handle = tmit_handle; | ||
2219 | } | 2215 | } |
2220 | else | 2216 | else |
2221 | { | 2217 | { |