From d6facd44e8a2507598f12645a5a026f31de6b4d2 Mon Sep 17 00:00:00 2001 From: Matthias Wachs Date: Mon, 5 Nov 2012 09:39:22 +0000 Subject: [PATCH] coverity bugs 10360 && 10361 --- src/transport/plugin_transport_http_server.c | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/src/transport/plugin_transport_http_server.c b/src/transport/plugin_transport_http_server.c index fba3601c8..d447846ef 100644 --- a/src/transport/plugin_transport_http_server.c +++ b/src/transport/plugin_transport_http_server.c @@ -540,8 +540,7 @@ http_server_plugin_send (void *cls, return GNUNET_SYSERR; } - - if (GNUNET_YES == session->server_send->disconnect) + if ((NULL != session->server_send) && (GNUNET_YES == session->server_send->disconnect)) return GNUNET_SYSERR; GNUNET_log_from (GNUNET_ERROR_TYPE_DEBUG, session->plugin->name, @@ -567,10 +566,9 @@ http_server_plugin_send (void *cls, stat_txt, msgbuf_size, GNUNET_NO); GNUNET_free (stat_txt); - server_reschedule (session->plugin, session->server_send->mhd_daemon, GNUNET_YES); + server_reschedule (session->plugin, session->server_send->mhd_daemon, + (NULL != session->server_send) ? GNUNET_YES : GNUNET_NO); server_reschedule_session_timeout (session); - - /* struct Plugin *plugin = cls; */ return bytes_sent; } @@ -1127,7 +1125,7 @@ server_lookup_connection (struct HTTP_Server_Plugin *plugin, if (direction == _RECEIVE) s->server_recv = sc; - if ((NULL != s->server_send) && (NULL != s->server_send)) + if ((NULL != s->server_send) && (NULL != s->server_recv)) s->connect_in_progress = GNUNET_NO; /* PUT and GET are connected */ #if MHD_VERSION >= 0x00090E00 -- 2.25.1