A correction from the main trunk that was forgotten.
authorRichard Levitte <levitte@openssl.org>
Tue, 13 Mar 2001 14:39:51 +0000 (14:39 +0000)
committerRichard Levitte <levitte@openssl.org>
Tue, 13 Mar 2001 14:39:51 +0000 (14:39 +0000)
ssl/ssl_lib.c

index 0efbf20a1bd5baacac8c7aa5b6a0d67dc95e2a55..1fe85b6cb7560ac209381f11641bb55b9ac73ecf 100644 (file)
@@ -1685,6 +1685,10 @@ SSL *SSL_dup(SSL *s)
 
                if (s->cert != NULL)
                        {
+                       if (ret->cert != NULL)
+                               {
+                               ssl_cert_free(ret->cert);
+                               }
                        ret->cert = ssl_cert_dup(s->cert);
                        if (ret->cert == NULL)
                                goto err;