]> git.ipfire.org Git - thirdparty/systemd.git/commit - src/tmpfiles/tmpfiles.c
tmpfiles: fix memory leak in arg_exclude_prefixes
authorAntonio Alvarez Feijoo <antonio.feijoo@suse.com>
Mon, 8 Jan 2024 15:08:26 +0000 (16:08 +0100)
committerLennart Poettering <lennart@poettering.net>
Mon, 8 Jan 2024 18:08:42 +0000 (19:08 +0100)
commit7f13af72f894529502267e7eed8e8b480a350345
tree53d0f620af92515f0d80bbf288df9765add6e2e3
parent4bcd606815ecfac45177688af42f4907a8ec563b
tmpfiles: fix memory leak in arg_exclude_prefixes

When using the `--image` or `-E` options, `arg_exclude_prefixes` is extended via
the `exclude_default_prefixes` function, which calls `strv_extend_strv`, adding
values using `strdup` that must be freed on exit.

Also changing `arg_include_prefixes` to use the same model, although there is no
leak here.
src/tmpfiles/tmpfiles.c