diff --git a/src/core/devices/nm-device.c b/src/core/devices/nm-device.c index 5aabc4cb90..4c1cc4160b 100644 --- a/src/core/devices/nm-device.c +++ b/src/core/devices/nm-device.c @@ -15088,8 +15088,8 @@ respawn_ping_cb(gpointer user_data) nm_clear_g_source_inst(&ping_op->watch); if (!spawn_ping_for_operation(self, ping_op)) { - cleanup_ping_operation(ping_op); priv->ping_operations = g_list_remove(priv->ping_operations, ping_op); + cleanup_ping_operation(ping_op); if (g_list_length(priv->ping_operations) == 0) { ip_check_pre_up(self); @@ -15132,7 +15132,6 @@ ip_check_ping_watch_cb(GPid pid, int status, gpointer user_data) if (success) { if (ping_op->ping_addresses_require_all) { - cleanup_ping_operation(ping_op); priv->ping_operations = g_list_remove(priv->ping_operations, ping_op); if (g_list_length(priv->ping_operations) == 0) { _LOGD(ping_op->log_domain, @@ -15142,6 +15141,7 @@ ip_check_ping_watch_cb(GPid pid, int status, gpointer user_data) nm_clear_g_source_inst(&priv->ping_timeout); ip_check_pre_up(self); } + cleanup_ping_operation(ping_op); } else { nm_assert(priv->ping_operations); diff --git a/src/core/nm-bond-manager.c b/src/core/nm-bond-manager.c index 2f7fe36c16..116cb73744 100644 --- a/src/core/nm-bond-manager.c +++ b/src/core/nm-bond-manager.c @@ -882,7 +882,7 @@ nm_bond_manager_send_arp(int bond_ifindex, .sll_protocol = htons(ETH_P_ARP), .sll_ifindex = bond_ifindex, }; - ARPPacket data; + ARPPacket data = {0}; const guint8 *hwaddr; gsize hwaddrlen = 0; nm_auto_close int sockfd = -1; @@ -940,6 +940,7 @@ nm_bond_manager_send_arp(int bond_ifindex, data.op = htons(ARP_OP_GARP); memcpy(data.s_addr, hwaddr, hwaddrlen); memcpy(data.s_hw_addr, hwaddr, hwaddrlen); + memset(data.d_hw_addr, 0xff, ETH_ALEN); for (int i = 0; i < addrs_len; i++) { const in_addr_t tmp_addr = addrs_array[i]; diff --git a/src/n-dhcp4/src/n-dhcp4-c-probe.c b/src/n-dhcp4/src/n-dhcp4-c-probe.c index 7a6def340c..58d61e72ba 100644 --- a/src/n-dhcp4/src/n-dhcp4-c-probe.c +++ b/src/n-dhcp4/src/n-dhcp4-c-probe.c @@ -1140,8 +1140,6 @@ int n_dhcp4_client_probe_transition_decline(NDhcp4ClientProbe *probe, NDhcp4Inco r = n_dhcp4_c_connection_send_request(&probe->connection, request, ns_now); if (r) return r; - else - request = NULL; /* consumed */ n_dhcp4_client_lease_unlink(probe->current_lease); probe->current_lease = n_dhcp4_client_lease_unref(probe->current_lease); @@ -1346,7 +1344,6 @@ int n_dhcp4_client_probe_release(NDhcp4ClientProbe *probe) { probe->state = N_DHCP4_CLIENT_PROBE_STATE_INIT; n_dhcp4_client_lease_unlink(probe->current_lease); - request_out = NULL; return 0; }