summaryrefslogtreecommitdiff
path: root/src/nspawn/nspawn.c
diff options
context:
space:
mode:
authorZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2019-07-17 10:09:18 +0200
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2019-07-17 11:35:04 +0200
commit622ecfa869047f9a62aa97895306f880d22f93bb (patch)
tree6e67ad09ced9e414f25a75991d503fd9834364fe /src/nspawn/nspawn.c
parent2d0a880fea8541289929bb8af146524ceebf6d61 (diff)
downloadsystemd-622ecfa869047f9a62aa97895306f880d22f93bb.tar.gz
systemd-622ecfa869047f9a62aa97895306f880d22f93bb.tar.bz2
systemd-622ecfa869047f9a62aa97895306f880d22f93bb.zip
nspawn: fix memleak in argument parsing
Coverity CID#1402297.
Diffstat (limited to 'src/nspawn/nspawn.c')
-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 117a637699..848e100344 100644
--- a/src/nspawn/nspawn.c
+++ b/src/nspawn/nspawn.c
@@ -1282,7 +1282,7 @@ static int parse_argv(int argc, char *argv[]) {
case ARG_RLIMIT: {
const char *eq;
- char *name;
+ _cleanup_free_ char *name = NULL;
int rl;
if (streq(optarg, "help")) {