1
0
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:
Zbigniew Jędrzejewski-Szmek 2016-07-25 12:21:50 -04:00
parent 662bea6729
commit f8654baa08

View File

@ -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) {