summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2015-01-14 22:30:43 +0100
committerLennart Poettering <lennart@poettering.net>2015-01-14 23:18:33 +0100
commitbb4a228207815df88cdf68acd9e46ec19e0d3e30 (patch)
treec6275aefc5fcc74d8f5639b7cb911564fab6dd99
parentaa0fff7f9c9fce89210ec764dd892afbdc28c571 (diff)
machinectl: fix minor memory leak
-rw-r--r--src/machine/machinectl.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/machine/machinectl.c b/src/machine/machinectl.c
index 980fba12a4..7ea991a81f 100644
--- a/src/machine/machinectl.c
+++ b/src/machine/machinectl.c
@@ -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);