Fix memory leak.
authorBen Laurie <ben@openssl.org>
Mon, 11 Jun 2012 09:23:55 +0000 (09:23 +0000)
committerBen Laurie <ben@openssl.org>
Mon, 11 Jun 2012 09:23:55 +0000 (09:23 +0000)
ssl/s3_lib.c
ssl/t1_lib.c

index 0f30d2d..1ac8191 100644 (file)
@@ -3036,6 +3036,13 @@ void ssl3_clear(SSL *s)
                s->s3->tmp.ecdh = NULL;
                }
 #endif
+#ifndef OPENSSL_NO_TLSEXT
+       if (s->s3->tlsext_authz_client_types != NULL)
+               {
+               OPENSSL_free(s->s3->tlsext_authz_client_types);
+               s->s3->tlsext_authz_client_types = NULL;
+               }
+#endif
 
        rp = s->s3->rbuf.buf;
        wp = s->s3->wbuf.buf;
index 85a5681..5b28599 100644 (file)
@@ -1781,6 +1781,8 @@ static int ssl_scan_clienthello_tlsext(SSL *s, unsigned char **p, unsigned char
                        if (!s->hit)
                                {
                                size_t i;
+                               if (s->s3->tlsext_authz_client_types != NULL)
+                                       OPENSSL_free(s->s3->tlsext_authz_client_types);
                                s->s3->tlsext_authz_client_types =
                                        OPENSSL_malloc(server_authz_dataformatlist_length);
                                if (!s->s3->tlsext_authz_client_types)