nspawn: fix memleak

Fixes oss-fuzz#13691.
This commit is contained in:
Yu Watanabe
2019-03-15 23:53:02 +09:00
parent 5ba40bb2cc
commit 1d0c1146ea

View File

@@ -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;