core: Fix memory leaks 70/276770/1
authorŁukasz Stelmach <l.stelmach@samsung.com>
Tue, 21 Jun 2022 10:12:01 +0000 (12:12 +0200)
committerŁukasz Stelmach <l.stelmach@samsung.com>
Fri, 24 Jun 2022 08:22:44 +0000 (10:22 +0200)
commit27b7cf01161e1688277ce959ea985bd27d16aed4
treeac368c6c093a46bff0a7ab1f57bcc2a102f120db
parent7da044b9e8024918780db81dc68c1e981bac732c
core: Fix memory leaks

arg_early_core_pattern and arg_watchdog_device hold pointers to memory
allocated with strdup() (inside path_make_absolute_cwd). The memory needs
to be freed in reset_arguments() during reload rather than forgotten.

Change-Id: I2ab2fb856ce9dae70443430d99279f4d4848231e
Signed-off-by: Łukasz Stelmach <l.stelmach@samsung.com>
Origin: https://github.com/systemd/systemd/commit/919ea64f69f710840c1bc93f0f7cb7c51aae45d0
src/core/main.c