Update from 1.0.0-stable
[openssl.git] / crypto / x509v3 / v3_alt.c
index b13c567..f7c7874 100644 (file)
@@ -366,6 +366,7 @@ static int copy_email(X509V3_CTX *ctx, GENERAL_NAMES *gens, int move_p)
                 if (move_p)
                         {
                         X509_NAME_delete_entry(nm, i);
                 if (move_p)
                         {
                         X509_NAME_delete_entry(nm, i);
+                       X509_NAME_ENTRY_free(ne);
                         i--;
                         }
                if(!email || !(gen = GENERAL_NAME_new())) {
                         i--;
                         }
                if(!email || !(gen = GENERAL_NAME_new())) {