From fedee536d5e414b6d8a7bb8a7587d9d747dd5394 Mon Sep 17 00:00:00 2001 From: Christian Grothoff Date: Mon, 13 Mar 2017 18:27:32 +0100 Subject: [PATCH] fix possible NPE --- src/gns/gnunet-gns-proxy.c | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/src/gns/gnunet-gns-proxy.c b/src/gns/gnunet-gns-proxy.c index 6eb87a95e..c336848ce 100644 --- a/src/gns/gnunet-gns-proxy.c +++ b/src/gns/gnunet-gns-proxy.c @@ -865,7 +865,8 @@ check_ssl_certificate (struct Socks5Request *s5r) const char *name; s5r->ssl_checked = GNUNET_YES; - GNUNET_log (GNUNET_ERROR_TYPE_ERROR, "XXXXXX\n"); + GNUNET_log (GNUNET_ERROR_TYPE_ERROR, + "Checking SSL certificate\n"); if (CURLE_OK != curl_easy_getinfo (s5r->curl, CURLINFO_TLS_SESSION, @@ -1882,19 +1883,22 @@ mhd_connection_cb (void *cls, { if (GNUNET_NETWORK_get_fd (s5r->sock) == sock) { - GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Context set...\n"); + GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, + "Context set...\n"); + s5r->ssl_checked = GNUNET_NO; *con_cls = s5r; break; } } - s5r->ssl_checked = GNUNET_NO; break; case MHD_CONNECTION_NOTIFY_CLOSED: - GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Connection closed... cleaning up\n"); + GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, + "Connection closed... cleaning up\n"); s5r = *con_cls; if (NULL == s5r) { - GNUNET_log (GNUNET_ERROR_TYPE_ERROR, "Connection stale!\n"); + GNUNET_log (GNUNET_ERROR_TYPE_ERROR, + "Connection stale!\n"); return; } cleanup_s5r (s5r); -- 2.25.1