1 Star 0 Fork 48

fe.zhang/systemd

forked from src-anolis-os/systemd 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
0345-bus_open-leak-sd_event_source-when-udevadm-trigger.patch 1.14 KB
一键复制 编辑 原始数据 按行查看 历史
geliwei 提交于 2021-06-16 16:46 . update to systemd-239-45.el8.src.rpm
From 448b34284c09469eaa2168291ccb34afc3e4cc1d Mon Sep 17 00:00:00 2001
From: ven <2988994+hexiaowen@users.noreply.github.com>
Date: Wed, 22 May 2019 14:24:28 +0800
Subject: [PATCH] =?UTF-8?q?bus=5Fopen=20leak=20sd=5Fevent=5Fsource=20when?=
=?UTF-8?q?=20udevadm=20trigger=E3=80=82?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
On my host, when executing the udevadm trigger, I only receive the change event, which causes memleak
(cherry picked from commit b2774a3ae692113e1f47a336a6c09bac9cfb49ad)
Resolves: #1798504
---
src/login/logind-button.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/src/login/logind-button.c b/src/login/logind-button.c
index 0defa6b9ba..9944eb2316 100644
--- a/src/login/logind-button.c
+++ b/src/login/logind-button.c
@@ -341,6 +341,7 @@ int button_open(Button *b) {
(void) button_set_mask(b);
+ b->io_event_source = sd_event_source_unref(b->io_event_source);
r = sd_event_add_io(b->manager->event, &b->io_event_source, b->fd, EPOLLIN, button_dispatch, b);
if (r < 0) {
log_error_errno(r, "Failed to add button event: %m");
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/fe_zhang/systemd.git
git@gitee.com:fe_zhang/systemd.git
fe_zhang
systemd
systemd
a8

搜索帮助