diff options
author | Sven Eden <yamakuzure@gmx.net> | 2017-03-29 10:05:50 +0200 |
---|---|---|
committer | Sven Eden <yamakuzure@gmx.net> | 2017-03-29 10:48:11 +0200 |
commit | 64b485bf89b90042c9a624633b038ef417b0325e (patch) | |
tree | 729aa69d958c20522ea9623083f87b8ffbb75a95 /src/basic/selinux-util.c | |
parent | 3cd22db822df747636dcf30ebb8ec5d16bb71880 (diff) |
[2/5] Apply missing fixes from upstream
Diffstat (limited to 'src/basic/selinux-util.c')
-rw-r--r-- | src/basic/selinux-util.c | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/src/basic/selinux-util.c b/src/basic/selinux-util.c index cea80b678..239900b79 100644 --- a/src/basic/selinux-util.c +++ b/src/basic/selinux-util.c @@ -303,14 +303,20 @@ int mac_selinux_get_child_mls_label(int socket_fd, const char *exe, const char * return r; } -void mac_selinux_free(char *label) { +char* mac_selinux_free(char *label) { #ifdef HAVE_SELINUX + if (!label) + return NULL; + if (!mac_selinux_use()) - return; + return NULL; + freecon((security_context_t) label); #endif + + return NULL; } #endif // 0 |