gnunet-svn
[Top][All Lists]
Advanced

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

[GNUnet-SVN] r37245 - in gnunet/src: multicast psyc psycutil


From: gnunet
Subject: [GNUnet-SVN] r37245 - in gnunet/src: multicast psyc psycutil
Date: Mon, 6 Jun 2016 22:31:04 +0200

Author: tg
Date: 2016-06-06 22:31:03 +0200 (Mon, 06 Jun 2016)
New Revision: 37245

Modified:
   gnunet/src/multicast/gnunet-service-multicast.c
   gnunet/src/multicast/multicast_api.c
   gnunet/src/psyc/gnunet-service-psyc.c
   gnunet/src/psyc/psyc_api.c
   gnunet/src/psycutil/psyc_slicer.c
Log:
fixes

Modified: gnunet/src/multicast/gnunet-service-multicast.c
===================================================================
--- gnunet/src/multicast/gnunet-service-multicast.c     2016-06-06 20:00:23 UTC 
(rev 37244)
+++ gnunet/src/multicast/gnunet-service-multicast.c     2016-06-06 20:31:03 UTC 
(rev 37245)
@@ -447,6 +447,7 @@
     if (c == chn)
     {
       GNUNET_CONTAINER_multihashmap_remove (grp_replay_req, &key, chn);
+      GNUNET_CONTAINER_multihashmap_iterator_destroy (it);
       return GNUNET_YES;
     }
   }
@@ -484,6 +485,7 @@
     if (c == client)
     {
       GNUNET_CONTAINER_multihashmap_remove (replay_req_client, &key, client);
+      GNUNET_CONTAINER_multihashmap_iterator_destroy (it);
       return GNUNET_YES;
     }
   }
@@ -759,7 +761,7 @@
                                           GNUNET_TIME_UNIT_FOREVER_REL,
                                           ntohs (msg->size),
                                           &cadet_notify_transmit_ready,
-                                          (void *) msg);
+                                          tcls);
   GNUNET_assert (NULL != chn->tmit_handle);
 }
 

Modified: gnunet/src/multicast/multicast_api.c
===================================================================
--- gnunet/src/multicast/multicast_api.c        2016-06-06 20:00:23 UTC (rev 
37244)
+++ gnunet/src/multicast/multicast_api.c        2016-06-06 20:31:03 UTC (rev 
37245)
@@ -204,9 +204,10 @@
 group_send_connect_msg (struct GNUNET_MULTICAST_Group *grp)
 {
   uint16_t cmsg_size = ntohs (grp->connect_msg->size);
-  struct GNUNET_MessageHeader * cmsg = GNUNET_malloc (cmsg_size);
+  struct GNUNET_MessageHeader *cmsg = GNUNET_malloc (cmsg_size);
   memcpy (cmsg, grp->connect_msg, cmsg_size);
   GNUNET_CLIENT_MANAGER_transmit_now (grp->client, cmsg);
+  GNUNET_free (cmsg);
 }
 
 

Modified: gnunet/src/psyc/gnunet-service-psyc.c
===================================================================
--- gnunet/src/psyc/gnunet-service-psyc.c       2016-06-06 20:00:23 UTC (rev 
37244)
+++ gnunet/src/psyc/gnunet-service-psyc.c       2016-06-06 20:31:03 UTC (rev 
37245)
@@ -866,7 +866,7 @@
   case GNUNET_SYSERR:
     GNUNET_MULTICAST_replay_response (rh, NULL,
                                       GNUNET_MULTICAST_REC_INTERNAL_ERROR);
-    break;
+    return;
   }
   GNUNET_MULTICAST_replay_response_end (rh);
 }
@@ -2006,7 +2006,6 @@
     send_message_ack (chn, tmit_msg->client);
 
   GNUNET_CONTAINER_DLL_remove (chn->tmit_head, chn->tmit_tail, tmit_msg);
-  GNUNET_free (tmit_msg);
 
   if (NULL != chn->tmit_head)
   {
@@ -2016,8 +2015,10 @@
            && tmit_msg->last_ptype < GNUNET_MESSAGE_TYPE_PSYC_MESSAGE_END)
   {
     /* FIXME: handle partial message (when still in_transmit) */
+    GNUNET_free (tmit_msg);
     return GNUNET_SYSERR;
   }
+  GNUNET_free (tmit_msg);
   return ret;
 }
 
@@ -2393,6 +2394,8 @@
 
   /** @todo FIXME: send only to requesting client */
   client_send_msg (chn, &res->header);
+
+  GNUNET_free (res);
   return GNUNET_YES;
 }
 
@@ -2528,6 +2531,7 @@
   GNUNET_SERVER_notification_context_add (nc, op->client);
   GNUNET_SERVER_notification_context_unicast (nc, op->client, &res->header,
                                               GNUNET_NO);
+  GNUNET_free (res);
   return GNUNET_YES;
 }
 

Modified: gnunet/src/psyc/psyc_api.c
===================================================================
--- gnunet/src/psyc/psyc_api.c  2016-06-06 20:00:23 UTC (rev 37244)
+++ gnunet/src/psyc/psyc_api.c  2016-06-06 20:31:03 UTC (rev 37245)
@@ -223,9 +223,10 @@
 channel_send_connect_msg (struct GNUNET_PSYC_Channel *chn)
 {
   uint16_t cmsg_size = ntohs (chn->connect_msg->size);
-  struct GNUNET_MessageHeader * cmsg = GNUNET_malloc (cmsg_size);
+  struct GNUNET_MessageHeader *cmsg = GNUNET_malloc (cmsg_size);
   memcpy (cmsg, chn->connect_msg, cmsg_size);
   GNUNET_CLIENT_MANAGER_transmit_now (chn->client, cmsg);
+  GNUNET_free (cmsg);
 }
 
 
@@ -762,6 +763,7 @@
     memcpy (&dcsn[1], join_resp, join_resp_size);
 
   GNUNET_CLIENT_MANAGER_transmit (chn->client, &dcsn->header);
+  GNUNET_free (dcsn);
   GNUNET_free (jh);
   return GNUNET_OK;
 }
@@ -1078,6 +1080,7 @@
                                                             result_cb, cls));
 
   GNUNET_CLIENT_MANAGER_transmit (chn->client, &req->header);
+  GNUNET_free (req);
 }
 
 
@@ -1129,6 +1132,7 @@
                                                             result_cb, cls));
 
   GNUNET_CLIENT_MANAGER_transmit (chn->client, &req->header);
+  GNUNET_free (req);
 }
 
 
@@ -1169,6 +1173,7 @@
   memcpy (&req[1], method_prefix, method_size);
 
   GNUNET_CLIENT_MANAGER_transmit (chn->client, &req->header);
+  GNUNET_free (req);
   return hist;
 }
 
@@ -1309,6 +1314,7 @@
   memcpy (&req[1], name, name_size);
 
   GNUNET_CLIENT_MANAGER_transmit (chn->client, &req->header);
+  GNUNET_free (req);
   return sr;
 }
 

Modified: gnunet/src/psycutil/psyc_slicer.c
===================================================================
--- gnunet/src/psycutil/psyc_slicer.c   2016-06-06 20:00:23 UTC (rev 37244)
+++ gnunet/src/psycutil/psyc_slicer.c   2016-06-06 20:31:03 UTC (rev 37245)
@@ -341,6 +341,7 @@
     slicer->mod_value_remaining = slicer->mod_full_value_size;
     slicer->mod_value_size
       = ntohs (mod->header.size) - sizeof (*mod) - slicer->mod_name_size;
+    // fall through
   }
   case GNUNET_MESSAGE_TYPE_PSYC_MESSAGE_MOD_CONT:
     if (ptype == GNUNET_MESSAGE_TYPE_PSYC_MESSAGE_MOD_CONT)




reply via email to

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