Commit 8605abf1 authored by Matt Caswell's avatar Matt Caswell
Browse files

Fix an error path leak in do_ext_nconf()



Reviewed-by: default avatarRich Salz <rsalz@openssl.org>
parent e68a780e
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -88,11 +88,13 @@ static X509_EXTENSION *do_ext_nconf(CONF *conf, X509V3_CTX *ctx, int ext_nid,
            nval = NCONF_get_section(conf, value + 1);
        else
            nval = X509V3_parse_list(value);
        if (sk_CONF_VALUE_num(nval) <= 0) {
        if (nval == NULL || sk_CONF_VALUE_num(nval) <= 0) {
            X509V3err(X509V3_F_DO_EXT_NCONF,
                      X509V3_R_INVALID_EXTENSION_STRING);
            ERR_add_error_data(4, "name=", OBJ_nid2sn(ext_nid), ",section=",
                               value);
            if (*value != '@')
                sk_CONF_VALUE_free(nval);
            return NULL;
        }
        ext_struc = method->v2i(method, ctx, nval);