c2dfb7
From 4da9dfaec0d7d232d8bfed0d7f65afd65369bc8c Mon Sep 17 00:00:00 2001
c2dfb7
From: =?UTF-8?q?Michal=20Sekleta=CC=81r?= <msekleta@redhat.com>
c2dfb7
Date: Fri, 5 Jun 2020 15:23:12 +0200
c2dfb7
Subject: [PATCH] core: fix the return value in order to make sure we don't
c2dfb7
 dipatch method return too early
c2dfb7
c2dfb7
Actually, it is the same kind of problem as in d910f4c . Basically, we
c2dfb7
need to return 1 on success code path in slice_freezer_action().
c2dfb7
Otherwise we dispatch DBus return message too soon.
c2dfb7
c2dfb7
Fixes: #16050
c2dfb7
(cherry picked from commit 2884836e3c26fa76718319cdc6d13136bbc1354d)
c2dfb7
c2dfb7
Related: #1830861
c2dfb7
---
c2dfb7
 src/core/slice.c | 2 +-
c2dfb7
 1 file changed, 1 insertion(+), 1 deletion(-)
c2dfb7
c2dfb7
diff --git a/src/core/slice.c b/src/core/slice.c
c2dfb7
index b5eb2f5c01..c10e830917 100644
c2dfb7
--- a/src/core/slice.c
c2dfb7
+++ b/src/core/slice.c
c2dfb7
@@ -399,7 +399,7 @@ static int slice_freezer_action(Unit *s, FreezerAction action) {
c2dfb7
         if (r < 0)
c2dfb7
                 return r;
c2dfb7
 
c2dfb7
-        return 0;
c2dfb7
+        return 1;
c2dfb7
 }
c2dfb7
 
c2dfb7
 static int slice_freeze(Unit *s) {