nspawn: fix memleak uncovered by fuzzer
This is almost the same as 0e636bf51a
. I looked through the code,
and I don't see any more instances of this pattern, so hopefully this
will be the last one.
https://oss-fuzz.com/issue/5660094128193536/13691.
This commit is contained in:
parent
f5164dfebc
commit
6d632d00ed
|
@ -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;
|
||||
|
||||
|
|
|
@ -0,0 +1,2 @@
|
|||
[Files]
|
||||
Overlay=/::
|
Loading…
Reference in New Issue