]> git.ipfire.org Git - thirdparty/systemd.git/commit
core: move reset_arguments() to the end of main's finish
authorAnita Zhang <the.anitazha@gmail.com>
Thu, 17 Sep 2020 08:49:17 +0000 (01:49 -0700)
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Mon, 28 Sep 2020 10:39:30 +0000 (12:39 +0200)
commit7d9eea2bd3d4f83668c7a78754d201b226acbf1e
tree02b7375758b6fcbd17ab9185cce7c0c2a1ae9141
parente535434d47444b796dea544d70d26b8dcd216029
core: move reset_arguments() to the end of main's finish

Fixes #16991

fb39af4ce42d7ef9af63009f271f404038703704 replaced `free_arguments()` with
`reset_arguments()`, which frees arg_* variables as before, but also resets all
of them to the default values. `reset_arguments()` was positioned
in such a way that it overrode some arg_* values still in use at shutdown.

To avoid further unintentional resets, I moved `reset_arguments()`
right before the return, when nothing else will be using the arg_* variables.
src/core/main.c