aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJulius Bünger <buenger@mytum.de>2015-02-05 18:35:39 +0000
committerJulius Bünger <buenger@mytum.de>2015-02-05 18:35:39 +0000
commit88031e0e8188e96d7ae4ce3659e6ed0d90a64f26 (patch)
treed581222eb201c19db84fc7b32dc3e76e04eb734f /src
parentc23aa9e8572045fb4774f8dd7a1c9975e51dae01 (diff)
downloadgnunet-88031e0e8188e96d7ae4ce3659e6ed0d90a64f26.tar.gz
gnunet-88031e0e8188e96d7ae4ce3659e6ed0d90a64f26.zip
- fixed resource leakages
Diffstat (limited to 'src')
-rw-r--r--src/rps/gnunet-service-rps.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/src/rps/gnunet-service-rps.c b/src/rps/gnunet-service-rps.c
index 388111f69..7d443e5d1 100644
--- a/src/rps/gnunet-service-rps.c
+++ b/src/rps/gnunet-service-rps.c
@@ -441,7 +441,10 @@ get_rand_peer_ignore_list (const struct GNUNET_PeerIdentity *peer_list,
441 rem_from_list (tmp_peer_list, &tmp_size, peer); 441 rem_from_list (tmp_peer_list, &tmp_size, peer);
442 442
443 if (0 == tmp_size) 443 if (0 == tmp_size)
444 {
445 GNUNET_free (peer);
444 return NULL; 446 return NULL;
447 }
445 448
446 /**; 449 /**;
447 * Choose the r_index of the peer we want to return 450 * Choose the r_index of the peer we want to return
@@ -1188,6 +1191,7 @@ do_round (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
1188 { 1191 {
1189 peer = *tmp_peer; 1192 peer = *tmp_peer;
1190 GNUNET_free (tmp_peer); 1193 GNUNET_free (tmp_peer);
1194
1191 GNUNET_array_append (pending_pull_reply_list, pending_pull_reply_list_size, peer); 1195 GNUNET_array_append (pending_pull_reply_list, pending_pull_reply_list_size, peer);
1192 1196
1193 if (0 != GNUNET_CRYPTO_cmp_peer_identity (&own_identity, &peer)) 1197 if (0 != GNUNET_CRYPTO_cmp_peer_identity (&own_identity, &peer))
@@ -1250,7 +1254,7 @@ do_round (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
1250 } 1254 }
1251 else 1255 else
1252 { 1256 {
1253 LOG (GNUNET_ERROR_TYPE_DEBUG, "No update of the gossip list. ()\n"); 1257 LOG (GNUNET_ERROR_TYPE_DEBUG, "No update of the gossip list.\n");
1254 } 1258 }
1255 // TODO independent of that also get some peers from CADET_get_peers()? 1259 // TODO independent of that also get some peers from CADET_get_peers()?
1256 1260
@@ -1405,6 +1409,9 @@ peer_remove_cb (void *cls, const struct GNUNET_PeerIdentity *key, void *value)
1405 1409
1406 peer_ctx = (struct PeerContext *) value; 1410 peer_ctx = (struct PeerContext *) value;
1407 1411
1412 if (0 != peer_ctx->num_outstanding_ops)
1413 GNUNET_array_grow (peer_ctx->outstanding_ops, peer_ctx->num_outstanding_ops, 0);
1414
1408 if (NULL != peer_ctx->mq) 1415 if (NULL != peer_ctx->mq)
1409 GNUNET_MQ_destroy (peer_ctx->mq); 1416 GNUNET_MQ_destroy (peer_ctx->mq);
1410 1417