summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/login/logind-session.c4
-rw-r--r--src/login/logind-user.c4
2 files changed, 6 insertions, 2 deletions
diff --git a/src/login/logind-session.c b/src/login/logind-session.c
index f670db853c..958b516701 100644
--- a/src/login/logind-session.c
+++ b/src/login/logind-session.c
@@ -526,7 +526,9 @@ static int session_create_cgroup(Session *s) {
}
}
- hashmap_put(s->manager->session_cgroups, s->cgroup_path, s);
+ r = hashmap_put(s->manager->session_cgroups, s->cgroup_path, s);
+ if (r < 0)
+ log_warning("Failed to create mapping between cgroup and session");
return 0;
}
diff --git a/src/login/logind-user.c b/src/login/logind-user.c
index 9dfead9d5d..b692b533e2 100644
--- a/src/login/logind-user.c
+++ b/src/login/logind-user.c
@@ -339,7 +339,9 @@ static int user_create_cgroup(User *u) {
log_warning("Failed to create cgroup %s:%s: %s", *k, p, strerror(-r));
}
- hashmap_put(u->manager->user_cgroups, u->cgroup_path, u);
+ r = hashmap_put(u->manager->user_cgroups, u->cgroup_path, u);
+ if (r < 0)
+ log_warning("Failed to create mapping between cgroup and user");
return 0;
}