summaryrefslogtreecommitdiffstats
path: root/debian/patches/0002-PATCH-Always-free-deserialized_subscribed-on-reload.patch
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--debian/patches/0002-PATCH-Always-free-deserialized_subscribed-on-reload.patch27
1 files changed, 27 insertions, 0 deletions
diff --git a/debian/patches/0002-PATCH-Always-free-deserialized_subscribed-on-reload.patch b/debian/patches/0002-PATCH-Always-free-deserialized_subscribed-on-reload.patch
new file mode 100644
index 0000000..4efd307
--- /dev/null
+++ b/debian/patches/0002-PATCH-Always-free-deserialized_subscribed-on-reload.patch
@@ -0,0 +1,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
+