]> git.proxmox.com Git - mirror_lxc.git/commitdiff
conf: cleanup macros idmaptool_on_path_[...]
authorChristian Brauner <christian.brauner@ubuntu.com>
Tue, 19 Feb 2019 22:46:34 +0000 (23:46 +0100)
committerChristian Brauner <christian.brauner@ubuntu.com>
Tue, 19 Feb 2019 22:50:25 +0000 (23:50 +0100)
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
src/lxc/conf.c

index 76d85c0f027a5f599c9608dd4de32d4288d4c885..f7ad1ba2fef43ddc3996fe91099433b08fe07614 100644 (file)
@@ -2839,7 +2839,7 @@ int write_id_mapping(enum idtype idtype, pid_t pid, const char *buf,
  */
 static int idmaptool_on_path_and_privileged(const char *binary, cap_value_t cap)
 {
-       char *path;
+       __do_free char *path = NULL;
        int ret;
        struct stat st;
        int fret = 0;
@@ -2895,7 +2895,6 @@ static int idmaptool_on_path_and_privileged(const char *binary, cap_value_t cap)
 #endif
 
 cleanup:
-       free(path);
        return fret;
 }