Skip to content

Commit 22f40a1

Browse files
authored
Merge pull request #9866 from embhorn/f196
Fix in wolfSSL_CTX_GenerateEchConfig
2 parents 7ee9bd0 + 37d6c14 commit 22f40a1

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/ssl_ech.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -137,6 +137,10 @@ int wolfSSL_CTX_GenerateEchConfig(WOLFSSL_CTX* ctx, const char* publicName,
137137

138138
if (ret != 0) {
139139
if (newConfig) {
140+
if (newConfig->receiverPrivkey != NULL) {
141+
wc_HpkeFreeKey(hpke, newConfig->kemId,
142+
newConfig->receiverPrivkey, ctx->heap);
143+
}
140144
XFREE(newConfig->cipherSuites, ctx->heap, DYNAMIC_TYPE_TMP_BUFFER);
141145
XFREE(newConfig->publicName, ctx->heap, DYNAMIC_TYPE_TMP_BUFFER);
142146
XFREE(newConfig, ctx->heap, DYNAMIC_TYPE_TMP_BUFFER);

0 commit comments

Comments
 (0)