diff options
author | Václav Pavlín <vpavlin@redhat.com> | 2012-09-21 13:01:39 +0200 |
---|---|---|
committer | Lennart Poettering <lennart@poettering.net> | 2012-09-21 16:04:48 +0200 |
commit | 5a165aa6b9aa921d8b069059026d84e879ac38cc (patch) | |
tree | f5fea0dddf489a097a9df591538e15188d76d8e4 /src/login/logind-user.c | |
parent | 2f29c419b01c104475f04d58a873b181273cfd8b (diff) |
logind: check return value, log warning on error
Diffstat (limited to 'src/login/logind-user.c')
-rw-r--r-- | src/login/logind-user.c | 4 |
1 files changed, 3 insertions, 1 deletions
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; } |