summaryrefslogtreecommitdiff
path: root/src/transport/plugin_transport_udp_broadcasting.c
diff options
context:
space:
mode:
authorMatthias Wachs <wachs@net.in.tum.de>2013-05-16 12:45:56 +0000
committerMatthias Wachs <wachs@net.in.tum.de>2013-05-16 12:45:56 +0000
commit3a03bbb4b950948d18e0e6c263fad2dca4e1a7c5 (patch)
treefcd38eb2e5e60a161a1dfe6da7880f349b450b5e /src/transport/plugin_transport_udp_broadcasting.c
parent12b5faf3eeb5bd10b3ad6f74d6f74d90299dbb3c (diff)
fixing memory leaks in udp
Diffstat (limited to 'src/transport/plugin_transport_udp_broadcasting.c')
-rw-r--r--src/transport/plugin_transport_udp_broadcasting.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/transport/plugin_transport_udp_broadcasting.c b/src/transport/plugin_transport_udp_broadcasting.c
index a2278f293..1f8490d5e 100644
--- a/src/transport/plugin_transport_udp_broadcasting.c
+++ b/src/transport/plugin_transport_udp_broadcasting.c
@@ -407,7 +407,7 @@ setup_broadcast (struct Plugin *plugin, struct sockaddr_in6 *serverAddrv6, struc
/* create IPv4 broadcast socket */
plugin->broadcast_ipv4 = GNUNET_NO;
- if (plugin->sockv4 != NULL)
+ if ((GNUNET_YES == plugin->enable_ipv4) && (plugin->sockv4 != NULL))
{
int yes = 1;
@@ -435,7 +435,7 @@ setup_broadcast (struct Plugin *plugin, struct sockaddr_in6 *serverAddrv6, struc
}
plugin->broadcast_ipv6 = GNUNET_NO;
- if (plugin->sockv6 != NULL)
+ if ((GNUNET_YES == plugin->enable_ipv4) && (plugin->sockv6 != NULL))
{
memset (&plugin->ipv6_multicast_address, 0, sizeof (struct sockaddr_in6));
GNUNET_assert (1 ==