summaryrefslogtreecommitdiff
path: root/src/grp-login/systemd-logind/logind-button.c
diff options
context:
space:
mode:
authorLuke Shumaker <lukeshu@sbcglobal.net>2016-12-17 03:11:52 -0500
committerLuke Shumaker <lukeshu@sbcglobal.net>2016-12-17 03:11:52 -0500
commitb849891b5dde5ee14ab8b7b7db74e65a4a38d993 (patch)
tree29bb0e6fda9b4b170041913de495da057bbe3621 /src/grp-login/systemd-logind/logind-button.c
parent004efebf9cc559ea131bb9460ee0ee198e2d5da7 (diff)
parent881228ff72434a0e3401a16bd87f179ef0ab1619 (diff)
Merge branch 'notsystemd/postmove' into notsystemd/master
# Conflicts: # src/grp-journal/libjournal-core/.gitignore # src/grp-system/libcore/include/core/mount.h
Diffstat (limited to 'src/grp-login/systemd-logind/logind-button.c')
-rw-r--r--src/grp-login/systemd-logind/logind-button.c9
1 files changed, 3 insertions, 6 deletions
diff --git a/src/grp-login/systemd-logind/logind-button.c b/src/grp-login/systemd-logind/logind-button.c
index 912140cc13..60e9f0a476 100644
--- a/src/grp-login/systemd-logind/logind-button.c
+++ b/src/grp-login/systemd-logind/logind-button.c
@@ -45,15 +45,12 @@ Button* button_new(Manager *m, const char *name) {
return NULL;
b->name = strdup(name);
- if (!b->name) {
- free(b);
- return NULL;
- }
+ if (!b->name)
+ return mfree(b);
if (hashmap_put(m->buttons, b->name, b) < 0) {
free(b->name);
- free(b);
- return NULL;
+ return mfree(b);
}
b->manager = m;