summaryrefslogtreecommitdiff
path: root/src/shared
diff options
context:
space:
mode:
Diffstat (limited to 'src/shared')
-rw-r--r--src/shared/cgroup-util.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/shared/cgroup-util.c b/src/shared/cgroup-util.c
index c5a5f8df83..43c415d760 100644
--- a/src/shared/cgroup-util.c
+++ b/src/shared/cgroup-util.c
@@ -1527,7 +1527,12 @@ char *cg_escape(const char *p) {
/* The return value of this function (unlike cg_unescape())
* needs free()! */
- if (p[0] == '_' || streq(p, "notify_on_release") || streq(p, "release_agent") || streq(p, "tasks"))
+ if (p[0] == 0 ||
+ p[0] == '_' ||
+ p[0] == '.' ||
+ streq(p, "notify_on_release") ||
+ streq(p, "release_agent") ||
+ streq(p, "tasks"))
need_prefix = true;
else {
const char *dot;