mirror of
https://github.com/systemd/systemd.git
synced 2024-11-01 17:51:22 +03:00
systemctl: simplify machine_info_clear
It is only used with info allocated on the stack, so the pointer cannot be NULL.
This commit is contained in:
parent
662bea6729
commit
f8654baa08
@ -1835,12 +1835,12 @@ static const struct bus_properties_map machine_info_property_map[] = {
|
||||
};
|
||||
|
||||
static void machine_info_clear(struct machine_info *info) {
|
||||
if (info) {
|
||||
free(info->name);
|
||||
free(info->state);
|
||||
free(info->control_group);
|
||||
zero(*info);
|
||||
}
|
||||
assert(info);
|
||||
|
||||
free(info->name);
|
||||
free(info->state);
|
||||
free(info->control_group);
|
||||
zero(*info);
|
||||
}
|
||||
|
||||
static void free_machines_list(struct machine_info *machine_infos, int n) {
|
||||
|
Loading…
Reference in New Issue
Block a user