diff options
author | Daniel Mack <github@zonque.org> | 2015-09-29 22:10:40 +0200 |
---|---|---|
committer | Daniel Mack <github@zonque.org> | 2015-09-29 22:10:40 +0200 |
commit | 2ea69f8d5e4a83397c5050914adf6452cafa9559 (patch) | |
tree | 0906a2b4440a0262d9ef2b3d79977e6b33ea74e6 /src/core/selinux-setup.c | |
parent | 41d5895f80962ab91472f5ec86fa55da60e14551 (diff) | |
parent | 7f96539d45028650f2ba9452095473a9c455d84b (diff) |
Merge pull request #1408 from poettering/systemctl-and-more
Systemctl and more
Diffstat (limited to 'src/core/selinux-setup.c')
-rw-r--r-- | src/core/selinux-setup.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/src/core/selinux-setup.c b/src/core/selinux-setup.c index e5b457643b..ff1ea23528 100644 --- a/src/core/selinux-setup.c +++ b/src/core/selinux-setup.c @@ -78,14 +78,14 @@ int mac_selinux_setup(bool *loaded_policy) { before_load = now(CLOCK_MONOTONIC); r = selinux_init_load_policy(&enforce); if (r == 0) { + _cleanup_(mac_selinux_freep) char *label = NULL; char timespan[FORMAT_TIMESPAN_MAX]; - char *label; mac_selinux_retest(); /* Transition to the new context */ r = mac_selinux_get_create_label_from_exe(SYSTEMD_BINARY_PATH, &label); - if (r < 0 || label == NULL) { + if (r < 0 || !label) { log_open(); log_error("Failed to compute init label, ignoring."); } else { @@ -94,8 +94,6 @@ int mac_selinux_setup(bool *loaded_policy) { log_open(); if (r < 0) log_error("Failed to transition into init label '%s', ignoring.", label); - - mac_selinux_free(label); } after_load = now(CLOCK_MONOTONIC); |