diff options
author | Nokis Mavrogiannopoulos | 2009-06-30 18:08:22 +0000 |
---|---|---|
committer | Nokis Mavrogiannopoulos | 2009-06-30 18:08:22 +0000 |
commit | 59a7ff53730ef1c7fb5e5d09665b429126fdde49 (patch) | |
tree | fab8eb77426846184cb51c3a677872cda41d95fa /src/gnutls_io.c | |
parent | 3a6321c9117950817d01cba3bd4201334a6ab70a (diff) |
Try to avoid bug http://issues.outoforder.cc/view.php?id=102
Diffstat (limited to 'src/gnutls_io.c')
-rw-r--r-- | src/gnutls_io.c | 9 |
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)) { |