diff options
author | Gabor X Toth <*@tg-x.net> | 2016-06-06 20:31:03 +0000 |
---|---|---|
committer | Gabor X Toth <*@tg-x.net> | 2016-06-06 20:31:03 +0000 |
commit | 49033aed99b605ba358ab67f9a8e25f117bdb93d (patch) | |
tree | f748a82f4065162b6555d6330952da9ff7e095d0 /src/psyc/psyc_api.c | |
parent | eaddede2ab93ecd09f4bb9514e682a2165b67718 (diff) | |
download | gnunet-49033aed99b605ba358ab67f9a8e25f117bdb93d.tar.gz gnunet-49033aed99b605ba358ab67f9a8e25f117bdb93d.zip |
fixes
Diffstat (limited to 'src/psyc/psyc_api.c')
-rw-r--r-- | src/psyc/psyc_api.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/src/psyc/psyc_api.c b/src/psyc/psyc_api.c index 018eb63ad..441c74a08 100644 --- a/src/psyc/psyc_api.c +++ b/src/psyc/psyc_api.c | |||
@@ -223,9 +223,10 @@ static void | |||
223 | channel_send_connect_msg (struct GNUNET_PSYC_Channel *chn) | 223 | channel_send_connect_msg (struct GNUNET_PSYC_Channel *chn) |
224 | { | 224 | { |
225 | uint16_t cmsg_size = ntohs (chn->connect_msg->size); | 225 | uint16_t cmsg_size = ntohs (chn->connect_msg->size); |
226 | struct GNUNET_MessageHeader * cmsg = GNUNET_malloc (cmsg_size); | 226 | struct GNUNET_MessageHeader *cmsg = GNUNET_malloc (cmsg_size); |
227 | memcpy (cmsg, chn->connect_msg, cmsg_size); | 227 | memcpy (cmsg, chn->connect_msg, cmsg_size); |
228 | GNUNET_CLIENT_MANAGER_transmit_now (chn->client, cmsg); | 228 | GNUNET_CLIENT_MANAGER_transmit_now (chn->client, cmsg); |
229 | GNUNET_free (cmsg); | ||
229 | } | 230 | } |
230 | 231 | ||
231 | 232 | ||
@@ -762,6 +763,7 @@ GNUNET_PSYC_join_decision (struct GNUNET_PSYC_JoinHandle *jh, | |||
762 | memcpy (&dcsn[1], join_resp, join_resp_size); | 763 | memcpy (&dcsn[1], join_resp, join_resp_size); |
763 | 764 | ||
764 | GNUNET_CLIENT_MANAGER_transmit (chn->client, &dcsn->header); | 765 | GNUNET_CLIENT_MANAGER_transmit (chn->client, &dcsn->header); |
766 | GNUNET_free (dcsn); | ||
765 | GNUNET_free (jh); | 767 | GNUNET_free (jh); |
766 | return GNUNET_OK; | 768 | return GNUNET_OK; |
767 | } | 769 | } |
@@ -1078,6 +1080,7 @@ GNUNET_PSYC_channel_slave_add (struct GNUNET_PSYC_Channel *chn, | |||
1078 | result_cb, cls)); | 1080 | result_cb, cls)); |
1079 | 1081 | ||
1080 | GNUNET_CLIENT_MANAGER_transmit (chn->client, &req->header); | 1082 | GNUNET_CLIENT_MANAGER_transmit (chn->client, &req->header); |
1083 | GNUNET_free (req); | ||
1081 | } | 1084 | } |
1082 | 1085 | ||
1083 | 1086 | ||
@@ -1129,6 +1132,7 @@ GNUNET_PSYC_channel_slave_remove (struct GNUNET_PSYC_Channel *chn, | |||
1129 | result_cb, cls)); | 1132 | result_cb, cls)); |
1130 | 1133 | ||
1131 | GNUNET_CLIENT_MANAGER_transmit (chn->client, &req->header); | 1134 | GNUNET_CLIENT_MANAGER_transmit (chn->client, &req->header); |
1135 | GNUNET_free (req); | ||
1132 | } | 1136 | } |
1133 | 1137 | ||
1134 | 1138 | ||
@@ -1169,6 +1173,7 @@ channel_history_replay (struct GNUNET_PSYC_Channel *chn, | |||
1169 | memcpy (&req[1], method_prefix, method_size); | 1173 | memcpy (&req[1], method_prefix, method_size); |
1170 | 1174 | ||
1171 | GNUNET_CLIENT_MANAGER_transmit (chn->client, &req->header); | 1175 | GNUNET_CLIENT_MANAGER_transmit (chn->client, &req->header); |
1176 | GNUNET_free (req); | ||
1172 | return hist; | 1177 | return hist; |
1173 | } | 1178 | } |
1174 | 1179 | ||
@@ -1309,6 +1314,7 @@ channel_state_get (struct GNUNET_PSYC_Channel *chn, | |||
1309 | memcpy (&req[1], name, name_size); | 1314 | memcpy (&req[1], name, name_size); |
1310 | 1315 | ||
1311 | GNUNET_CLIENT_MANAGER_transmit (chn->client, &req->header); | 1316 | GNUNET_CLIENT_MANAGER_transmit (chn->client, &req->header); |
1317 | GNUNET_free (req); | ||
1312 | return sr; | 1318 | return sr; |
1313 | } | 1319 | } |
1314 | 1320 | ||