Fix the fix (Yoram Zahavi)...
authorLutz Jänicke <jaenicke@openssl.org>
Wed, 27 Feb 2002 11:26:20 +0000 (11:26 +0000)
committerLutz Jänicke <jaenicke@openssl.org>
Wed, 27 Feb 2002 11:26:20 +0000 (11:26 +0000)
ssl/ssl_lib.c

index 4a32d3d659a85d8d99120717ca34f19322e73eb7..4f84a3476da0342e94e4bf0fd588a990fb497d08 100644 (file)
@@ -92,6 +92,12 @@ int SSL_clear(SSL *s)
                return(0);
                }
 
+       if (ssl_clear_bad_session(s))
+               {
+               SSL_SESSION_free(s->session);
+               s->session=NULL;
+               }
+
        s->error=0;
        s->hit=0;
        s->shutdown=0;
@@ -111,12 +117,6 @@ int SSL_clear(SSL *s)
 
        s->type=0;
 
-       if (ssl_clear_bad_session(s))
-               {
-               SSL_SESSION_free(s->session);
-               s->session=NULL;
-               }
-
        s->state=SSL_ST_BEFORE|((s->server)?SSL_ST_ACCEPT:SSL_ST_CONNECT);
 
        s->version=s->method->version;