chiark / gitweb /
machinectl: fix minor memory leak
authorLennart Poettering <lennart@poettering.net>
Wed, 14 Jan 2015 21:30:43 +0000 (22:30 +0100)
committerLennart Poettering <lennart@poettering.net>
Wed, 14 Jan 2015 22:18:33 +0000 (23:18 +0100)
src/machine/machinectl.c

index 980fba1..7ea991a 100644 (file)
@@ -1065,11 +1065,11 @@ static int copy_files(int argc, char *argv[], void *userdata) {
                 return -EINVAL;
         }
 
-        t = strdup(host_path);
+        t = strdupa(host_path);
         host_basename = basename(t);
         host_dirname = dirname(host_path);
 
-        t = strdup(container_path);
+        t = strdupa(container_path);
         container_basename = basename(t);
         container_dirname = dirname(container_path);