From a601e7d3b101f1594fcceab75d053dda0d4e98da Mon Sep 17 00:00:00 2001 From: Nikos Mavrogiannopoulos Date: Tue, 30 Jun 2009 18:08:22 +0000 Subject: Try to avoid bug http://issues.outoforder.cc/view.php?id=102 --- src/gnutls_io.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/src/gnutls_io.c b/src/gnutls_io.c index 65e128d..b06afd7 100644 --- a/src/gnutls_io.c +++ b/src/gnutls_io.c @@ -381,7 +381,8 @@ tryagain: #endif gnutls_alert_send(ctxt->session, GNUTLS_AL_FATAL, gnutls_error_to_alert(ret, NULL)); - gnutls_deinit(ctxt->session); + if (ctxt->session) gnutls_deinit(ctxt->session); + ctxt->session = NULL; return -1; } @@ -412,7 +413,8 @@ tryagain: ctxt->status = -1; gnutls_alert_send(ctxt->session, GNUTLS_AL_FATAL, gnutls_error_to_alert(ret, NULL)); - gnutls_deinit(ctxt->session); + if (ctxt->session) gnutls_deinit(ctxt->session); + ctxt->session = NULL; return ret; } else { @@ -555,7 +557,8 @@ apr_status_t mgs_filter_output(ap_filter_t * f, } apr_brigade_cleanup(ctxt->output_bb); - gnutls_deinit(ctxt->session); + if (ctxt->session) gnutls_deinit(ctxt->session); + ctxt->session = NULL; continue; } else if (APR_BUCKET_IS_FLUSH(bucket) || APR_BUCKET_IS_EOS(bucket)) { -- cgit