From 1d0c1146eaa4db5a496c43d56f8a441d0faed3d7 Mon Sep 17 00:00:00 2001 From: Yu Watanabe Date: Fri, 15 Mar 2019 23:53:02 +0900 Subject: [PATCH] nspawn: fix memleak Fixes oss-fuzz#13691. --- src/nspawn/nspawn-mount.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/nspawn/nspawn-mount.c b/src/nspawn/nspawn-mount.c index 12f557ee99..4878586c4e 100644 --- a/src/nspawn/nspawn-mount.c +++ b/src/nspawn/nspawn-mount.c @@ -304,7 +304,7 @@ int overlay_mount_parse(CustomMount **l, size_t *n, const char *s, bool read_onl /* If the upper directory is unspecified, then let's create it automatically as a throw-away directory * in /var/tmp */ if (isempty(upper)) - upper = NULL; + upper = mfree(upper); else if (!source_path_is_valid(upper)) return -EINVAL;