-ensure stats queues do not grow too big
[oweals/gnunet.git] / src / multicast / multicast_api.c
index 1b386fe1bc6e97db7e77c82655572e4ee97c8c15..ce36ef6f2b423dd67fdf66e5dacce1cac4b4a897 100644 (file)
@@ -204,9 +204,10 @@ static void
 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);
 }
 
 
@@ -904,6 +905,7 @@ GNUNET_MULTICAST_origin_to_all (struct GNUNET_MULTICAST_Origin *orig,
   struct GNUNET_MULTICAST_OriginTransmitHandle *tmit = &orig->tmit;
   tmit->origin = orig;
   tmit->message_id = message_id;
+  tmit->fragment_offset = 0;
   tmit->group_generation = group_generation;
   tmit->notify = notify;
   tmit->notify_cls = notify_cls;
@@ -1226,6 +1228,7 @@ GNUNET_MULTICAST_member_to_origin (struct GNUNET_MULTICAST_Member *mem,
   struct GNUNET_MULTICAST_MemberTransmitHandle *tmit = &mem->tmit;
   tmit->member = mem;
   tmit->request_id = request_id;
+  tmit->fragment_offset = 0;
   tmit->notify = notify;
   tmit->notify_cls = notify_cls;