Don't compare a just free()d pointer
authorKurt Roeckx <kurt@roeckx.be>
Sun, 5 Jun 2016 18:48:08 +0000 (20:48 +0200)
committerKurt Roeckx <kurt@roeckx.be>
Sat, 11 Jun 2016 14:43:49 +0000 (16:43 +0200)
Found by tis-interpreter

Reviewed-by: Rich Salz <rsalz@openssl.org>
GH: #1173

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);