summaryrefslogtreecommitdiff
path: root/src/nspawn
diff options
context:
space:
mode:
authorZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2012-09-16 16:33:20 +0200
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2012-09-16 16:33:20 +0200
commit89154bd4ac71157e382bacdc4dc3a96990940d36 (patch)
tree6795a055e92ace89ce30eae4bea2dfa2d6b982ae /src/nspawn
parent25ea79fe0756c3c46a16c0c19bf3380a30382a1c (diff)
nspawn: fix memleak introduced with automatic cleanup
6b2d0e8 introduced a memleak instead of fixing one. Fix both.
Diffstat (limited to 'src/nspawn')
-rw-r--r--src/nspawn/nspawn.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/nspawn/nspawn.c b/src/nspawn/nspawn.c
index b494045b8..ab7a239ed 100644
--- a/src/nspawn/nspawn.c
+++ b/src/nspawn/nspawn.c
@@ -284,9 +284,9 @@ static int mount_all(const char *dest) {
unsigned k;
int r = 0;
- char _cleanup_free_ *where = NULL;
for (k = 0; k < ELEMENTSOF(mount_table); k++) {
+ char _cleanup_free_ *where = NULL;
int t;
if (asprintf(&where, "%s/%s", dest, mount_table[k].where) < 0) {