1 Star 0 Fork 10

jinlun/dim_9

forked from src-openEuler/dim 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
backport-Set-dim_core_keyring-to-NULL-when-initialize-failed.patch 677 Bytes
一键复制 编辑 原始数据 按行查看 历史
jinlun 提交于 2024-04-16 10:12 . backport some patches
From 388653ae7f32fe19af71405f5d08d0f7cde7b2ba Mon Sep 17 00:00:00 2001
From: Huaxin Lu <luhuaxin1@huawei.com>
Date: Tue, 20 Feb 2024 12:50:23 +0800
Subject: [PATCH 24/26] Set dim_core_keyring to NULL when initialize failed
---
src/core/dim_core_sig.c | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/src/core/dim_core_sig.c b/src/core/dim_core_sig.c
index f142050..07e11d8 100644
--- a/src/core/dim_core_sig.c
+++ b/src/core/dim_core_sig.c
@@ -182,8 +182,11 @@ int dim_core_sig_init(void)
ret = 0;
err:
dim_vfree(data);
- if (ret < 0)
+ if (ret < 0) {
key_put(dim_core_keyring);
+ dim_core_keyring = NULL;
+ }
+
return ret;
}
--
2.33.0
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/jinlun123123/dim_9.git
git@gitee.com:jinlun123123/dim_9.git
jinlun123123
dim_9
dim_9
master

搜索帮助

0d507c66 1850385 C8b1a773 1850385