代码拉取完成,页面将自动刷新
同步操作将从 src-openEuler/systemd 强制同步,此操作会覆盖自 Fork 仓库以来所做的任何修改,且无法恢复!!!
确定后同步将在后台操作,完成时将刷新页面,请耐心等待。
From 66ca4903ca74604b193802635d36c48b0fcaf291 Mon Sep 17 00:00:00 2001
From: Topi Miettinen <toiwoton@gmail.com>
Date: Thu, 2 Jan 2020 19:59:48 +0200
Subject: [PATCH] dbus-execute: avoid extra strdup()
bind_mount_add does the strdup(), so we can avoid
strdup()ing the strings.
https://github.com/systemd/systemd/commit/66ca4903ca74604b193802635d36c48b0fcaf291
---
src/core/dbus-execute.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/src/core/dbus-execute.c b/src/core/dbus-execute.c
index 2be3db2..abd60ea 100644
--- a/src/core/dbus-execute.c
+++ b/src/core/dbus-execute.c
@@ -2370,7 +2370,7 @@ int bus_exec_context_set_transient_property(
return 1;
} else if (STR_IN_SET(name, "BindPaths", "BindReadOnlyPaths")) {
- const char *source, *destination;
+ char *source, *destination;
int ignore_enoent;
uint64_t mount_flags;
bool empty = true;
@@ -2391,8 +2391,8 @@ int bus_exec_context_set_transient_property(
if (!UNIT_WRITE_FLAGS_NOOP(flags)) {
r = bind_mount_add(&c->bind_mounts, &c->n_bind_mounts,
&(BindMount) {
- .source = strdup(source),
- .destination = strdup(destination),
+ .source = source,
+ .destination = destination,
.read_only = !!strstr(name, "ReadOnly"),
.recursive = !!(mount_flags & MS_REC),
.ignore_enoent = ignore_enoent,
--
2.19.1
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。