mirror of https://github.com/openssl/openssl.git
ts_conf: fix memory leak in TS_CONF_set_policies
Reviewed-by: Paul Dale <ppzgs1@gmail.com>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/28686)
(cherry picked from commit 1f3a6602a1
)
This commit is contained in:
parent
b5ab449e26
commit
8cfb565117
|
@ -330,8 +330,10 @@ int TS_CONF_set_policies(CONF *conf, const char *section, TS_RESP_CTX *ctx)
|
||||||
ts_CONF_invalid(section, ENV_OTHER_POLICIES);
|
ts_CONF_invalid(section, ENV_OTHER_POLICIES);
|
||||||
goto err;
|
goto err;
|
||||||
}
|
}
|
||||||
if (!TS_RESP_CTX_add_policy(ctx, objtmp))
|
if (!TS_RESP_CTX_add_policy(ctx, objtmp)) {
|
||||||
|
ASN1_OBJECT_free(objtmp);
|
||||||
goto err;
|
goto err;
|
||||||
|
}
|
||||||
ASN1_OBJECT_free(objtmp);
|
ASN1_OBJECT_free(objtmp);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue