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