netifd_ubus_remove_interface(iface);
avl_delete(&interfaces.avl, &iface->node.avl);
free(iface->zone);
- if (iface->jail)
- free(iface->jail);
- if (iface->jail_device)
- free(iface->jail_device);
- if (iface->host_device)
- free(iface->host_device);
-
+ free(iface->jail);
+ free(iface->jail_device);
+ free(iface->host_device);
free(iface);
}
if_old->device_config = if_new->device_config;
if_old->config_autostart = if_new->config_autostart;
- if (if_old->jail)
- free(if_old->jail);
+ free(if_old->jail);
if_old->jail = if_new->jail;
if (if_old->jail)
if_old->autostart = false;
- if (if_old->jail_device)
- free(if_old->jail_device);
-
+ free(if_old->jail_device);
if_old->jail_device = if_new->jail_device;
- if (if_old->host_device)
- free(if_old->host_device);
-
+ free(if_old->host_device);
if_old->host_device = if_new->host_device;
if_old->device = if_new->device;