30 lines
935 B
Diff
30 lines
935 B
Diff
|
|
From 81236d6ec506dd84c78e6c09fc39d5019ea483f2 Mon Sep 17 00:00:00 2001
|
||
|
|
From: seuzw930 <76191785+seuzw930@users.noreply.github.com>
|
||
|
|
Date: Thu, 7 Jul 2022 20:47:11 +0800
|
||
|
|
Subject: [PATCH] Fix memory leak when globally de-initialize GnuTLS
|
||
|
|
|
||
|
|
During globally de-initialize GnuTLS, server anon credentials and server DH parameters for anon mode were not null. It resulted in memory leak and this patch fixes this behaviour.
|
||
|
|
|
||
|
|
Conflict:NA
|
||
|
|
Reference:https://github.com/rsyslog/rsyslog/commit/8e13d9d718d26b15263ecd53e26fed1a2af3f3e9
|
||
|
|
---
|
||
|
|
runtime/nsd_gtls.c | 2 ++
|
||
|
|
1 file changed, 2 insertions(+)
|
||
|
|
|
||
|
|
diff --git a/runtime/nsd_gtls.c b/runtime/nsd_gtls.c
|
||
|
|
index 01b0ec6..8f13810 100644
|
||
|
|
--- a/runtime/nsd_gtls.c
|
||
|
|
+++ b/runtime/nsd_gtls.c
|
||
|
|
@@ -1307,6 +1307,8 @@ static rsRetVal
|
||
|
|
gtlsGlblExit(void)
|
||
|
|
{
|
||
|
|
DEFiRet;
|
||
|
|
+ gnutls_anon_free_server_credentials(anoncredSrv);
|
||
|
|
+ gnutls_dh_params_deinit(dh_params);
|
||
|
|
gnutls_global_deinit();
|
||
|
|
RETiRet;
|
||
|
|
}
|
||
|
|
--
|
||
|
|
2.33.0
|
||
|
|
|