gnunet-svn
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[GNUnet-SVN] r35108 - gnunet/src/rps


From: gnunet
Subject: [GNUnet-SVN] r35108 - gnunet/src/rps
Date: Thu, 5 Feb 2015 19:35:39 +0100

Author: ch3
Date: 2015-02-05 19:35:39 +0100 (Thu, 05 Feb 2015)
New Revision: 35108

Modified:
   gnunet/src/rps/gnunet-service-rps.c
Log:
- fixed resource leakages

Modified: gnunet/src/rps/gnunet-service-rps.c
===================================================================
--- gnunet/src/rps/gnunet-service-rps.c 2015-02-05 17:47:52 UTC (rev 35107)
+++ gnunet/src/rps/gnunet-service-rps.c 2015-02-05 18:35:39 UTC (rev 35108)
@@ -441,7 +441,10 @@
     rem_from_list (tmp_peer_list, &tmp_size, peer);
 
     if (0 == tmp_size)
+    {
+      GNUNET_free (peer);
       return NULL;
+    }
 
     /**;
      * Choose the r_index of the peer we want to return
@@ -1188,6 +1191,7 @@
     {
       peer = *tmp_peer;
       GNUNET_free (tmp_peer);
+
       GNUNET_array_append (pending_pull_reply_list, 
pending_pull_reply_list_size, peer);
 
       if (0 != GNUNET_CRYPTO_cmp_peer_identity (&own_identity, &peer))
@@ -1250,7 +1254,7 @@
   }
   else
   {
-    LOG (GNUNET_ERROR_TYPE_DEBUG, "No update of the gossip list. ()\n");
+    LOG (GNUNET_ERROR_TYPE_DEBUG, "No update of the gossip list.\n");
   }
   // TODO independent of that also get some peers from CADET_get_peers()?
 
@@ -1405,6 +1409,9 @@
 
   peer_ctx = (struct PeerContext *) value;
 
+  if (0 != peer_ctx->num_outstanding_ops)
+    GNUNET_array_grow (peer_ctx->outstanding_ops, 
peer_ctx->num_outstanding_ops, 0);
+
   if (NULL != peer_ctx->mq)
     GNUNET_MQ_destroy (peer_ctx->mq);
 




reply via email to

[Prev in Thread] Current Thread [Next in Thread]