1 Star 0 Fork 38

huyab/rsyslog

forked from src-openEuler/rsyslog 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
backport-Fix-memory-leak-when-globally-de-initialize-GnuTLS.patch 935 Bytes
一键复制 编辑 原始数据 按行查看 历史
From 81236d6ec506dd84c78e6c09fc39d5019ea483f2 Mon Sep 17 00:00:00 2001
From: seuzw930 <[email protected]>
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
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/huyab/rsyslog.git
[email protected]:huyab/rsyslog.git
huyab
rsyslog
rsyslog
master

搜索帮助