PR: 1892
authorDr. Stephen Henson <steve@openssl.org>
Wed, 8 Apr 2009 15:58:07 +0000 (15:58 +0000)
committerDr. Stephen Henson <steve@openssl.org>
Wed, 8 Apr 2009 15:58:07 +0000 (15:58 +0000)
Fix memory leak when email:move option used.

crypto/x509v3/v3_alt.c

index b13c5674a1345c76196cd07e5a981c6d2641e1d1..f7c7874cac942bb0e40befcea16182546afbf8f2 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);
+                       X509_NAME_ENTRY_free(ne);
                         i--;
                         }
                if(!email || !(gen = GENERAL_NAME_new())) {