PR: 2072
authorDr. Stephen Henson <steve@openssl.org>
Fri, 16 Oct 2009 15:24:07 +0000 (15:24 +0000)
committerDr. Stephen Henson <steve@openssl.org>
Fri, 16 Oct 2009 15:24:07 +0000 (15:24 +0000)
Submitted by: Tomas Mraz <tmraz@redhat.com>
Approved by: steve@openssl.org

Avoid potential doublefree and reuse of freed handshake_buffer.

ssl/s3_lib.c

index 7aa1c037b25758d97edb56a0cd6bd97e957b7508..d6b047c9955ade3aa1e722495e91601aa3709a67 100644 (file)
@@ -2211,6 +2211,7 @@ void ssl3_clear(SSL *s)
        wlen = s->s3->wbuf.len;
        if (s->s3->handshake_buffer) {
                BIO_free(s->s3->handshake_buffer);
+               s->s3->handshake_buffer = NULL;
        }
        if (s->s3->handshake_dgst) {
                ssl3_free_digest_list(s);