summaryrefslogtreecommitdiffstats
path: root/debian/patches/0002-PATCH-Always-free-deserialized_subscribed-on-reload.patch
blob: 4efd3074295645e8c45d088bf89ede8a9199fb45 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
From 550108c5692296b55be7c919a174fc6540e83355 Mon Sep 17 00:00:00 2001
From: Ali Abdallah <ali.abdallah@suse.com>
Date: Thu, 21 Jan 2021 07:37:21 +0100
Subject: PATCH] Always free deserialized_subscribed on reload

Otherwise, it will keep consuming memory on systemctl daemon-reload.
---
 src/core/manager.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/src/core/manager.c b/src/core/manager.c
index 6086531bab..5cd7167954 100644
--- a/src/core/manager.c
+++ b/src/core/manager.c
@@ -3543,6 +3543,9 @@ int manager_reload(Manager *m) {
         /* Clean up runtime objects no longer referenced */
         manager_vacuum(m);
 
+        /* Clean up deserialized tracked clients */
+        m->deserialized_subscribed = strv_free(m->deserialized_subscribed);
+
         /* Consider the reload process complete now. */
         assert(m->n_reloading > 0);
         m->n_reloading--;
-- 
2.30.2