mirror of
https://github.com/kakwa/uts-server
synced 2025-01-10 13:44:29 +01:00
better cleaning in case of an initialization error
This commit is contained in:
parent
f7cf646e61
commit
878117a084
@ -208,7 +208,6 @@ end:
|
|||||||
|
|
||||||
TS_RESP_CTX *create_tsctx(rfc3161_context *ct, CONF *conf, const char *section,
|
TS_RESP_CTX *create_tsctx(rfc3161_context *ct, CONF *conf, const char *section,
|
||||||
const char *policy) {
|
const char *policy) {
|
||||||
int ret = 0;
|
|
||||||
unsigned long err_code;
|
unsigned long err_code;
|
||||||
unsigned long err_code_prev = 0;
|
unsigned long err_code_prev = 0;
|
||||||
TS_RESP_CTX *resp_ctx = NULL;
|
TS_RESP_CTX *resp_ctx = NULL;
|
||||||
@ -302,7 +301,7 @@ TS_RESP_CTX *create_tsctx(rfc3161_context *ct, CONF *conf, const char *section,
|
|||||||
"ess_cert_id_chain", section);
|
"ess_cert_id_chain", section);
|
||||||
goto end;
|
goto end;
|
||||||
}
|
}
|
||||||
ret = 1;
|
return resp_ctx;
|
||||||
end:
|
end:
|
||||||
while ((err_code = ERR_get_error())) {
|
while ((err_code = ERR_get_error())) {
|
||||||
if (err_code_prev != err_code) {
|
if (err_code_prev != err_code) {
|
||||||
@ -319,7 +318,8 @@ end:
|
|||||||
}
|
}
|
||||||
err_code_prev = err_code;
|
err_code_prev = err_code;
|
||||||
}
|
}
|
||||||
return resp_ctx;
|
TS_RESP_CTX_free(resp_ctx);
|
||||||
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
static TS_RESP *create_response(CONF *conf, const char *section, char *engine,
|
static TS_RESP *create_response(CONF *conf, const char *section, char *engine,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user