[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[GNUnet-SVN] r21153 - in gnunet/src: ats integration-tests namestore tra
From: |
gnunet |
Subject: |
[GNUnet-SVN] r21153 - in gnunet/src: ats integration-tests namestore transport |
Date: |
Wed, 25 Apr 2012 15:03:44 +0200 |
Author: wachs
Date: 2012-04-25 15:03:44 +0200 (Wed, 25 Apr 2012)
New Revision: 21153
Modified:
gnunet/src/ats/gnunet-service-ats_addresses_mlp.c
gnunet/src/integration-tests/connection_watchdog.c
gnunet/src/namestore/gnunet-service-namestore.c
gnunet/src/transport/plugin_transport_tcp.c
Log:
- coverity bugs
Modified: gnunet/src/ats/gnunet-service-ats_addresses_mlp.c
===================================================================
--- gnunet/src/ats/gnunet-service-ats_addresses_mlp.c 2012-04-25 12:37:19 UTC
(rev 21152)
+++ gnunet/src/ats/gnunet-service-ats_addresses_mlp.c 2012-04-25 13:03:44 UTC
(rev 21153)
@@ -593,7 +593,7 @@
/* Set -r */
ia[mlp->ci] = peer->r_c9;
ja[mlp->ci] = mlp->c_r;
- ar[mlp->ci] = -1;
+ ar[mlp->ci] = -peer->f;
mlp->ci++;
#endif
/* For all addresses of this peer */
Modified: gnunet/src/integration-tests/connection_watchdog.c
===================================================================
--- gnunet/src/integration-tests/connection_watchdog.c 2012-04-25 12:37:19 UTC
(rev 21152)
+++ gnunet/src/integration-tests/connection_watchdog.c 2012-04-25 13:03:44 UTC
(rev 21153)
@@ -144,7 +144,7 @@
void *value)
{
struct PeerContainer *pc = value;
- GNUNET_CONTAINER_multihashmap_remove(peers, key, value);
+ GNUNET_assert (GNUNET_OK == GNUNET_CONTAINER_multihashmap_remove(peers, key,
value));
if (NULL != pc->th_ping)
{
GNUNET_TRANSPORT_notify_transmit_ready_cancel(pc->th_ping);
@@ -927,7 +927,7 @@
{
if (0 != memcmp (peer, &my_peer_id, sizeof (struct GNUNET_PeerIdentity)))
{
- GNUNET_assert (core_connections >= 0);
+ GNUNET_assert (core_connections > 0);
GNUNET_log (GNUNET_ERROR_TYPE_INFO, "CORE disconnect for peer `%s'
(%u total)\n",
GNUNET_i2s (peer), core_connections);
map_disconnect (peer, ch);
Modified: gnunet/src/namestore/gnunet-service-namestore.c
===================================================================
--- gnunet/src/namestore/gnunet-service-namestore.c 2012-04-25 12:37:19 UTC
(rev 21152)
+++ gnunet/src/namestore/gnunet-service-namestore.c 2012-04-25 13:03:44 UTC
(rev 21153)
@@ -1480,7 +1480,7 @@
proc->rd = NULL;
proc->name = NULL;
}
- else
+ else if ((zone_key != NULL) && (name != NULL)) /* just a safety check */
{
rd_filtered = GNUNET_malloc (rd_count * sizeof (struct
GNUNET_NAMESTORE_RecordData));
GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Received result for zone iteration:
`%s'\n", name);
@@ -1568,6 +1568,11 @@
}
}
}
+ else
+ {
+ GNUNET_break (0);
+ return;
+ }
}
Modified: gnunet/src/transport/plugin_transport_tcp.c
===================================================================
--- gnunet/src/transport/plugin_transport_tcp.c 2012-04-25 12:37:19 UTC (rev
21152)
+++ gnunet/src/transport/plugin_transport_tcp.c 2012-04-25 13:03:44 UTC (rev
21153)
@@ -1906,6 +1906,7 @@
GNUNET_a2s(vaddr, alen));
GNUNET_break_op (0);
GNUNET_SERVER_receive_done (client, GNUNET_SYSERR);
+ GNUNET_free_non_null(vaddr);
return;
}
else if (GNUNET_YES == session->expecting_welcome)
@@ -1921,6 +1922,7 @@
GNUNET_a2s(vaddr, alen));
GNUNET_break_op (0);
GNUNET_SERVER_receive_done (client, GNUNET_SYSERR);
+ GNUNET_free_non_null(vaddr);
return;
}
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [GNUnet-SVN] r21153 - in gnunet/src: ats integration-tests namestore transport,
gnunet <=