chiark / gitweb /
[2/5] Apply missing fixes from upstream
[elogind.git] / src / basic / selinux-util.c
index cea80b678fe701e4d78959991c5ff9f007fed2ef..239900b79560671e4c780ab5abefc8f8f6ae3f3b 100644 (file)
@@ -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