Changeset 1d48b0a in mod_gnutls for src


Ignore:
Timestamp:
Jul 20, 2009, 5:14:37 PM (10 years ago)
Author:
Nokis Mavrogiannopoulos <nmav@…>
Branches:
debian/master, debian/stretch-backports, jessie-backports, master, msva, upstream
Children:
daf3dc9
Parents:
67101aa
git-author:
Nikos Mavrogiannopoulos <nmav@…> (07/20/09 17:14:37)
git-committer:
Nokis Mavrogiannopoulos <nmav@…> (07/20/09 17:14:37)
Message:

More fixes related to bug #102

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/gnutls_io.c

    r67101aa r1d48b0a  
    380380                     "GnuTLS: Handshake Failed. Hit Maximum Attempts");
    381381#endif
    382         gnutls_alert_send(ctxt->session, GNUTLS_AL_FATAL,
     382        if (ctxt->session) {
     383            gnutls_alert_send(ctxt->session, GNUTLS_AL_FATAL,
    383384                          gnutls_error_to_alert(ret, NULL));
    384         if (ctxt->session) gnutls_deinit(ctxt->session);
     385            gnutls_deinit(ctxt->session);
     386        }
    385387        ctxt->session = NULL;
    386388        return -1;
     
    412414#endif
    413415        ctxt->status = -1;
    414         gnutls_alert_send(ctxt->session, GNUTLS_AL_FATAL,
     416        if (ctxt->session) {
     417            gnutls_alert_send(ctxt->session, GNUTLS_AL_FATAL,
    415418                          gnutls_error_to_alert(ret, NULL));
    416         if (ctxt->session) gnutls_deinit(ctxt->session);
     419            gnutls_deinit(ctxt->session);
     420        }
    417421        ctxt->session = NULL;
    418422        return ret;
     
    560564
    561565            apr_brigade_cleanup(ctxt->output_bb);
    562             if (ctxt->session) gnutls_deinit(ctxt->session);
    563             ctxt->session = NULL;
     566            if (APR_BUCKET_IS_EOS(bucket) && ctxt->session) {
     567                gnutls_deinit(ctxt->session);
     568                ctxt->session = NULL;
     569            }
    564570            continue;
    565571
Note: See TracChangeset for help on using the changeset viewer.