X Tutup
Skip to content

Commit 6d632d0

Browse files
committed
nspawn: fix memleak uncovered by fuzzer
This is almost the same as 0e636bf. 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.
1 parent f5164df commit 6d632d0

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

src/nspawn/nspawn-mount.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -304,7 +304,7 @@ int overlay_mount_parse(CustomMount **l, size_t *n, const char *s, bool read_onl
304304
/* If the upper directory is unspecified, then let's create it automatically as a throw-away directory
305305
* in /var/tmp */
306306
if (isempty(upper))
307-
upper = NULL;
307+
upper = mfree(upper);
308308
else if (!source_path_is_valid(upper))
309309
return -EINVAL;
310310

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
[Files]
2+
Overlay=/::

0 commit comments

Comments
 (0)
X Tutup