Don't compare a just free()d pointer
[openssl.git] / ssl / ssl_lib.c
index d4b83359061e2fb5c73237c24a7b69f3cde9b288..359260e1f561475b67e28ae5d7f893dd6a9e9d4c 100644 (file)
@@ -948,9 +948,9 @@ void SSL_free(SSL *s)
         BIO_free(s->bbio);
         s->bbio = NULL;
     }
-    BIO_free_all(s->rbio);
     if (s->wbio != s->rbio)
         BIO_free_all(s->wbio);
+    BIO_free_all(s->rbio);
 
     BUF_MEM_free(s->init_buf);