aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorGravatar Nikos Mavrogiannopoulos 2009-06-30 18:08:22 +0000
committerGravatar Nokis Mavrogiannopoulos 2009-06-30 18:08:22 +0000
commita601e7d3b101f1594fcceab75d053dda0d4e98da (patch)
treefab8eb77426846184cb51c3a677872cda41d95fa /src
parentf7a7d667da23db5c834d5149e75eb89d3b03af4b (diff)
Try to avoid bug http://issues.outoforder.cc/view.php?id=102
Diffstat (limited to 'src')
-rw-r--r--src/gnutls_io.c9
1 files 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:
381#endif 381#endif
382 gnutls_alert_send(ctxt->session, GNUTLS_AL_FATAL, 382 gnutls_alert_send(ctxt->session, GNUTLS_AL_FATAL,
383 gnutls_error_to_alert(ret, NULL)); 383 gnutls_error_to_alert(ret, NULL));
384 gnutls_deinit(ctxt->session); 384 if (ctxt->session) gnutls_deinit(ctxt->session);
385 ctxt->session = NULL;
385 return -1; 386 return -1;
386 } 387 }
387 388
@@ -412,7 +413,8 @@ tryagain:
412 ctxt->status = -1; 413 ctxt->status = -1;
413 gnutls_alert_send(ctxt->session, GNUTLS_AL_FATAL, 414 gnutls_alert_send(ctxt->session, GNUTLS_AL_FATAL,
414 gnutls_error_to_alert(ret, NULL)); 415 gnutls_error_to_alert(ret, NULL));
415 gnutls_deinit(ctxt->session); 416 if (ctxt->session) gnutls_deinit(ctxt->session);
417 ctxt->session = NULL;
416 return ret; 418 return ret;
417 } 419 }
418 else { 420 else {
@@ -555,7 +557,8 @@ apr_status_t mgs_filter_output(ap_filter_t * f,
555 } 557 }
556 558
557 apr_brigade_cleanup(ctxt->output_bb); 559 apr_brigade_cleanup(ctxt->output_bb);
558 gnutls_deinit(ctxt->session); 560 if (ctxt->session) gnutls_deinit(ctxt->session);
561 ctxt->session = NULL;
559 continue; 562 continue;
560 563
561 } else if (APR_BUCKET_IS_FLUSH(bucket) || APR_BUCKET_IS_EOS(bucket)) { 564 } else if (APR_BUCKET_IS_FLUSH(bucket) || APR_BUCKET_IS_EOS(bucket)) {