summaryrefslogtreecommitdiff
path: root/src/login/logind-session.c
diff options
context:
space:
mode:
authorVáclav Pavlín <vpavlin@redhat.com>2012-09-21 13:01:39 +0200
committerLennart Poettering <lennart@poettering.net>2012-09-21 16:04:48 +0200
commit5a165aa6b9aa921d8b069059026d84e879ac38cc (patch)
treef5fea0dddf489a097a9df591538e15188d76d8e4 /src/login/logind-session.c
parent2f29c419b01c104475f04d58a873b181273cfd8b (diff)
logind: check return value, log warning on error
Diffstat (limited to 'src/login/logind-session.c')
-rw-r--r--src/login/logind-session.c4
1 files changed, 3 insertions, 1 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;
}