]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
selinux-util: drop _cleanup_context_free_
authorYu Watanabe <watanabe.yu+github@gmail.com>
Sat, 18 Jan 2025 19:09:52 +0000 (04:09 +0900)
committerYu Watanabe <watanabe.yu+github@gmail.com>
Sat, 18 Jan 2025 19:09:55 +0000 (04:09 +0900)
It is used at only one place, not necessary.

src/shared/selinux-util.c

index ff49e219a0b92a2a74b05f7dc7e1b2425143cfbf..27ed339ff89df0351ca1329d216abd08194e6247 100644 (file)
@@ -31,7 +31,6 @@
 
 #if HAVE_SELINUX
 DEFINE_TRIVIAL_CLEANUP_FUNC_FULL(context_t, context_free, NULL);
-#define _cleanup_context_free_ _cleanup_(context_freep)
 
 typedef enum Initialized {
         UNINITIALIZED,
@@ -471,7 +470,7 @@ int mac_selinux_get_our_label(char **ret) {
 int mac_selinux_get_child_mls_label(int socket_fd, const char *exe, const char *exec_label, char **ret_label) {
 #if HAVE_SELINUX
         _cleanup_freecon_ char *mycon = NULL, *peercon = NULL, *fcon = NULL;
-        _cleanup_context_free_ context_t pcon = NULL, bcon = NULL;
+        _cleanup_(context_freep) context_t pcon = NULL, bcon = NULL;
         const char *range = NULL, *bcon_str = NULL;
         security_class_t sclass;
         int r;