diff options
author | Phil Sutter <phil@nwl.cc> | 2023-06-22 01:10:59 +0200 |
---|---|---|
committer | Phil Sutter <phil@nwl.cc> | 2023-07-04 13:03:09 +0200 |
commit | 75bfaeb7edd1fc2ae7a72318af808d8b010262b4 (patch) | |
tree | 0471270dd9be78c8f14a0c9c71a72ff8e204b6a3 /src/evaluate.c | |
parent | 516a36c8d01fa03aafaf56a7eafa31ec0a9084db (diff) |
cli: Make cli_init() return to caller
Avoid direct exit() calls as that leaves the caller-allocated nft_ctx
object in place. Making sure it is freed helps with valgrind-analyses at
least.
To signal desired exit from CLI, introduce global cli_quit boolean and
make all cli_exit() implementations also set cli_rc variable to the
appropriate return code.
The logic is to finish CLI only if cli_quit is true which asserts proper
cleanup as it is set only by the respective cli_exit() function.
Signed-off-by: Phil Sutter <phil@nwl.cc>
Diffstat (limited to 'src/evaluate.c')
0 files changed, 0 insertions, 0 deletions