In commit 246aa6d (core: add bus API and systemctl commands for altering
cgroup
parameters during runtime), when rewriting unit_add_one_default_cgroup
to prefered style, the check of strduped b->controller was incorrectly
changed to check the containing structure. Correct it.
Nestor Ovroy
>From b356dcee92e75a2755cec8112b4df721bb79079c Mon Sep 17 00:00:00 2001
From: Nestor Ovroy <[email protected]>
Date: Wed, 16 Jan 2013 19:22:42 +0100
Subject: [PATCH] core: corrects check of strduped controller string
In commit 246aa6d (core: add bus API and systemctl commands for altering cgroup
parameters during runtime), when rewriting unit_add_one_default_cgroup
to prefered style, the check of strduped b->controller was incorrectly
changed to check the containing structure. Correct it.
---
src/core/unit.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/core/unit.c b/src/core/unit.c
index 1194c52..d26f6e4 100644
--- a/src/core/unit.c
+++ b/src/core/unit.c
@@ -2090,7 +2090,7 @@ static int unit_add_one_default_cgroup(Unit *u, const char *controller) {
return -ENOMEM;
b->controller = strdup(controller);
- if (!b)
+ if (!b->controller)
goto fail;
b->path = unit_default_cgroup_path(u);
--
1.7.10.4
_______________________________________________
systemd-devel mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/systemd-devel