1
0
mirror of https://github.com/systemd/systemd.git synced 2025-01-10 05:18:17 +03:00

systemctl: port to static destructors

This commit is contained in:
Lennart Poettering 2019-03-15 10:42:32 +01:00
parent a49945e663
commit 61ff45db95

View File

@ -179,6 +179,12 @@ static bool arg_now = false;
static bool arg_jobs_before = false;
static bool arg_jobs_after = false;
STATIC_DESTRUCTOR_REGISTER(arg_wall, strv_freep);
STATIC_DESTRUCTOR_REGISTER(arg_root, freep);
STATIC_DESTRUCTOR_REGISTER(arg_types, strv_freep);
STATIC_DESTRUCTOR_REGISTER(arg_states, strv_freep);
STATIC_DESTRUCTOR_REGISTER(arg_properties, strv_freep);
static int daemon_reload(int argc, char *argv[], void* userdata);
static int trivial_method(int argc, char *argv[], void *userdata);
static int halt_now(enum action a);
@ -9245,13 +9251,6 @@ static int run(int argc, char *argv[]) {
finish:
release_busses();
strv_free(arg_types);
strv_free(arg_states);
strv_free(arg_properties);
strv_free(arg_wall);
free(arg_root);
/* Note that we return r here, not 0, so that we can implement the LSB-like return codes */
return r;
}