summaryrefslogtreecommitdiff
path: root/src/nspawn
diff options
context:
space:
mode:
authorZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2017-01-15 16:57:57 -0500
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2017-01-15 16:57:57 -0500
commite0489532fd5969be6e261a558cae91005820fc0e (patch)
tree49ec6d6ada91ccfb80752fc4e1bd623e289a42cf /src/nspawn
parent402a81c7742ee8b66f93f9eb1e7cb6227b6768e4 (diff)
nspawn: fix memleak
CID #1368262: fn is allocated with new, so it should be freed.
Diffstat (limited to 'src/nspawn')
-rw-r--r--src/nspawn/nspawn.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/nspawn/nspawn.c b/src/nspawn/nspawn.c
index 6396a69c5c..78ae2f4a0f 100644
--- a/src/nspawn/nspawn.c
+++ b/src/nspawn/nspawn.c
@@ -3470,8 +3470,8 @@ static int run(int master,
}
static int load_root_hash(const char *image) {
- _cleanup_free_ char *text = NULL;
- char *fn, *n, *e;
+ _cleanup_free_ char *text = NULL, *fn = NULL;
+ char *n, *e;
void *k;
size_t l;
int r;