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
2cad001d77
commit
49efe65615
|
@ -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);
|
||||
goto err;
|
||||
}
|
||||
if (!TS_RESP_CTX_add_policy(ctx, objtmp))
|
||||
if (!TS_RESP_CTX_add_policy(ctx, objtmp)) {
|
||||
ASN1_OBJECT_free(objtmp);
|
||||
goto err;
|
||||
}
|
||||
ASN1_OBJECT_free(objtmp);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue