1 Star 0 Fork 100

dfh/systemd

forked from src-openEuler/systemd 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
backport-fix-conf-parser-oom-check-issue.patch 841 Bytes
一键复制 编辑 原始数据 按行查看 历史
hanjinpeng 提交于 2024-05-08 16:58 . sync patches from systemd community
From 4dc646fa1ae83c570801a22d256e39eb3508a17b Mon Sep 17 00:00:00 2001
From: Antonio Alvarez Feijoo <antonio.feijoo@suse.com>
Date: Tue, 30 Jan 2024 11:59:54 +0100
Subject: [PATCH] conf-parser: fix OOM check
(cherry picked from commit 0fa25bd5f4789e8b37be5dd7927bab81c18c2dcd)
---
src/shared/conf-parser.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/shared/conf-parser.c b/src/shared/conf-parser.c
index 59a529d4bcb..e8ecd9bc794 100644
--- a/src/shared/conf-parser.c
+++ b/src/shared/conf-parser.c
@@ -466,7 +466,7 @@ int hashmap_put_stats_by_path(Hashmap **stats_by_path, const char *path, const s
return -ENOMEM;
path_copy = strdup(path);
- if (!path)
+ if (!path_copy)
return -ENOMEM;
r = hashmap_put(*stats_by_path, path_copy, st_copy);
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/dufuhang/systemd.git
git@gitee.com:dufuhang/systemd.git
dufuhang
systemd
systemd
master

搜索帮助