cryptodev_digest_update: don't leak original state->mac_data if realloc fails
[oweals/openssl.git] / crypto / x509v3 / v3_alt.c
index b13c5674a1345c76196cd07e5a981c6d2641e1d1..d29d94338ec506b77d2f0fde904a50b89551368c 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())) {
@@ -464,6 +465,7 @@ GENERAL_NAME *a2i_GENERAL_NAME(GENERAL_NAME *out,
                        }
                gen->d.rid = obj;
                }
+               break;
 
                case GEN_IPADD:
                if (is_nc)
@@ -492,6 +494,7 @@ GENERAL_NAME *a2i_GENERAL_NAME(GENERAL_NAME *out,
                        X509V3err(X509V3_F_A2I_GENERAL_NAME,X509V3_R_OTHERNAME_ERROR);
                        goto err;
                        }
+               break;
                default:
                X509V3err(X509V3_F_A2I_GENERAL_NAME,X509V3_R_UNSUPPORTED_TYPE);
                goto err;