systemd/SOURCES/0101-shared-Fix-memory-leak-in-bus_append_execute_propert.patch

27 lines
1.1 KiB
Diff
Raw Normal View History

2022-11-15 06:58:41 +00:00
From 18b0bc42dc097af6147324deef100c41dedfa755 Mon Sep 17 00:00:00 2001
2022-09-20 11:48:44 +00:00
From: Daan De Meyer <daan.j.demeyer@gmail.com>
Date: Mon, 9 May 2022 09:50:32 +0200
Subject: [PATCH] shared: Fix memory leak in bus_append_execute_property()
Fixes #23317
(cherry picked from commit 2aaf6d407e8541985a15b7106abf6fbdfed0766a)
2022-11-15 06:58:41 +00:00
Related: #2087652
2022-09-20 11:48:44 +00:00
---
src/shared/bus-unit-util.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/shared/bus-unit-util.c b/src/shared/bus-unit-util.c
index dcce530c99..ef134bcee4 100644
--- a/src/shared/bus-unit-util.c
+++ b/src/shared/bus-unit-util.c
@@ -1952,7 +1952,7 @@ static int bus_append_execute_property(sd_bus_message *m, const char *field, con
path_simplify(source);
if (isempty(destination)) {
- r = strv_extend(&sources, TAKE_PTR(source));
+ r = strv_consume(&sources, TAKE_PTR(source));
if (r < 0)
return bus_log_create_error(r);
} else {