32 lines
1.0 KiB
Diff
32 lines
1.0 KiB
Diff
From 46cf6e2e8f20dfe0dcb6694bd9706a225533a0dd Mon Sep 17 00:00:00 2001
|
|
From: Michal Sekletar <msekleta@redhat.com>
|
|
Date: Thu, 16 Apr 2026 12:27:25 +0200
|
|
Subject: [PATCH] core/manager: fix memory leak
|
|
|
|
Follow-up for 63899267ba57ab4b0b11c039f5c6b03a78528aa7
|
|
|
|
RHEL-only
|
|
|
|
Resolves: RHEL-163867
|
|
---
|
|
src/core/manager.c | 6 ++++--
|
|
1 file changed, 4 insertions(+), 2 deletions(-)
|
|
|
|
diff --git a/src/core/manager.c b/src/core/manager.c
|
|
index d95a6db77c..51325f0212 100644
|
|
--- a/src/core/manager.c
|
|
+++ b/src/core/manager.c
|
|
@@ -1812,8 +1812,10 @@ int manager_propagate_reload(Manager *m, Unit *unit, JobMode mode, sd_bus_error
|
|
|
|
/* Only activate the transaction if it contains jobs other than NOP anchor.
|
|
* Short-circuiting here avoids unnecessary processing, such as emitting D-Bus signals. */
|
|
- if (hashmap_size(tr->jobs) <= 1)
|
|
- return 0;
|
|
+ if (hashmap_size(tr->jobs) <= 1) {
|
|
+ r = 0;
|
|
+ goto tr_abort;
|
|
+ }
|
|
|
|
r = transaction_activate(tr, m, mode, NULL, e);
|
|
if (r < 0)
|