Fixed coverity 10178
authorBart Polot <bart@net.in.tum.de>
Wed, 12 Oct 2011 14:22:45 +0000 (14:22 +0000)
committerBart Polot <bart@net.in.tum.de>
Wed, 12 Oct 2011 14:22:45 +0000 (14:22 +0000)
src/mesh/gnunet-service-mesh.c

index 79cad3df86861ca16a16dbdb82413b74a3594036..fdae1c2b1aea442741e4ecea1c3620fb7d81d515 100644 (file)
@@ -2124,6 +2124,8 @@ handle_mesh_data_multicast (void *cls, const struct GNUNET_PeerIdentity *peer,
   for (*copies = 0; NULL != n; n = n->next)
     (*copies)++;
   n = t->tree->me->children_head;
+  if (NULL == n)
+    return;
   data = GNUNET_malloc (size);
   memcpy (data, &msg[1], size);
   while (NULL != n)