[openssl] master update
Richard Levitte
levitte at openssl.org
Fri May 28 09:13:02 UTC 2021
The branch master has been updated
via 32075a17249636b3e2986a0ac422b1803663ccaa (commit)
from a935791d54078f43209ffbc1886ac5e68772ce34 (commit)
- Log -----------------------------------------------------------------
commit 32075a17249636b3e2986a0ac422b1803663ccaa
Author: Petr Gotthard <petr.gotthard at centrum.cz>
Date: Tue May 25 15:39:01 2021 +0200
Fix memory leak in OSSL_CMP_CTX
The ctx->propq is strdup'ed, so it must be free'd too.
Reviewed-by: Ben Kaduk <kaduk at mit.edu>
Reviewed-by: Tomas Mraz <tomas at openssl.org>
(Merged from https://github.com/openssl/openssl/pull/15458)
-----------------------------------------------------------------------
Summary of changes:
crypto/cmp/cmp_ctx.c | 1 +
crypto/cmp/cmp_local.h | 2 +-
2 files changed, 2 insertions(+), 1 deletion(-)
diff --git a/crypto/cmp/cmp_ctx.c b/crypto/cmp/cmp_ctx.c
index a09432597b..d1f8f27e13 100644
--- a/crypto/cmp/cmp_ctx.c
+++ b/crypto/cmp/cmp_ctx.c
@@ -179,6 +179,7 @@ void OSSL_CMP_CTX_free(OSSL_CMP_CTX *ctx)
(void)OSSL_HTTP_close(ctx->http_ctx, 1);
ossl_cmp_debug(ctx, "disconnected from CMP server");
}
+ OPENSSL_free(ctx->propq);
OPENSSL_free(ctx->serverPath);
OPENSSL_free(ctx->server);
OPENSSL_free(ctx->proxy);
diff --git a/crypto/cmp/cmp_local.h b/crypto/cmp/cmp_local.h
index eee609937b..fec4916ed3 100644
--- a/crypto/cmp/cmp_local.h
+++ b/crypto/cmp/cmp_local.h
@@ -32,7 +32,7 @@
*/
struct ossl_cmp_ctx_st {
OSSL_LIB_CTX *libctx;
- const char *propq;
+ char *propq;
OSSL_CMP_log_cb_t log_cb; /* log callback for error/debug/etc. output */
OSSL_CMP_severity log_verbosity; /* level of verbosity of log output */
More information about the openssl-commits
mailing list