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