diff options
Diffstat (limited to 'src/network')
-rw-r--r-- | src/network/networkd-netdev-bond.c | 3 | ||||
-rw-r--r-- | src/network/networkd-netdev-tuntap.c | 7 | ||||
-rw-r--r-- | src/network/networkd-wait-online-link.c | 6 |
3 files changed, 5 insertions, 11 deletions
diff --git a/src/network/networkd-netdev-bond.c b/src/network/networkd-netdev-bond.c index a60034dbe6..12e2321674 100644 --- a/src/network/networkd-netdev-bond.c +++ b/src/network/networkd-netdev-bond.c @@ -204,9 +204,8 @@ static int netdev_bond_fill_message_create(NetDev *netdev, Link *link, sd_netlin if (b->lacp_rate != _NETDEV_BOND_LACP_RATE_INVALID && b->mode == NETDEV_BOND_MODE_802_3AD) { r = sd_netlink_message_append_u8(m, IFLA_BOND_AD_LACP_RATE, b->lacp_rate ); - if (r < 0) { + if (r < 0) return log_netdev_error_errno(netdev, r, "Could not append IFLA_BOND_AD_LACP_RATE attribute: %m"); - } } if (b->miimon != 0) { diff --git a/src/network/networkd-netdev-tuntap.c b/src/network/networkd-netdev-tuntap.c index ba84e802fc..6a808b6205 100644 --- a/src/network/networkd-netdev-tuntap.c +++ b/src/network/networkd-netdev-tuntap.c @@ -143,11 +143,8 @@ static void tuntap_done(NetDev *netdev) { assert(t); - free(t->user_name); - t->user_name = NULL; - - free(t->group_name); - t->group_name = NULL; + t->user_name = mfree(t->user_name); + t->group_name = mfree(t->group_name); } static int tuntap_verify(NetDev *netdev, const char *filename) { diff --git a/src/network/networkd-wait-online-link.c b/src/network/networkd-wait-online-link.c index 2d5123788c..cacb4c257e 100644 --- a/src/network/networkd-wait-online-link.c +++ b/src/network/networkd-wait-online-link.c @@ -120,13 +120,11 @@ int link_update_rtnl(Link *l, sd_netlink_message *m) { int link_update_monitor(Link *l) { assert(l); - free(l->operational_state); - l->operational_state = NULL; + l->operational_state = mfree(l->operational_state); sd_network_link_get_operational_state(l->ifindex, &l->operational_state); - free(l->state); - l->state = NULL; + l->state = mfree(l->state); sd_network_link_get_setup_state(l->ifindex, &l->state); |