bugs from codesonar
authorNathan S. Evans <evans@in.tum.de>
Fri, 11 Jun 2010 10:54:55 +0000 (10:54 +0000)
committerNathan S. Evans <evans@in.tum.de>
Fri, 11 Jun 2010 10:54:55 +0000 (10:54 +0000)
src/transport/gnunet-service-transport.c
src/transport/plugin_transport_udp.c

index 857693ea02b64a3e3891492774249330b8f04f03..1dcd988a9a67e5efd228a8cb8f2180780459b6b0 100644 (file)
@@ -1042,6 +1042,7 @@ read_blacklist_file (const struct GNUNET_CONFIGURATION_Handle *cfg)
     }
   /* FIXME: use mmap */
   data = GNUNET_malloc_large (frstat.st_size);
+  GNUNET_assert(data != NULL);
   if (frstat.st_size !=
       GNUNET_DISK_fn_read (fn, data, frstat.st_size))
     {
index ad8a70f0b812f562e3d2254c58459cbc296ca6b4..14b80d9e9dcad813d20a4ca680ca5b2fc3645626 100644 (file)
@@ -522,7 +522,8 @@ udp_real_send (void *cls,
   GNUNET_log_from (GNUNET_ERROR_TYPE_INFO, "udp", _
                    ("udp_plugin_send called without address, returning!\n"));
 #endif
-      cont (cont_cls, target, GNUNET_SYSERR);
+      if (cont != NULL)
+        cont (cont_cls, target, GNUNET_SYSERR);
       return 0; /* Can never send if we don't have an address!! */
     }