device: minor cleanup NMDevice's _set_state_full() for unrefing activation request

This commit is contained in:
Thomas Haller 2020-01-20 14:45:14 +01:00
parent c2f8400e66
commit c6745013fb

View file

@ -15497,7 +15497,7 @@ _set_state_full (NMDevice *self,
{
NMDevicePrivate *priv;
NMDeviceState old_state;
NMActRequest *req;
gs_unref_object NMActRequest *req = NULL;
gboolean no_firmware = FALSE;
NMSettingsConnection *sett_conn;
NMSettingSriov *s_sriov;
@ -15833,8 +15833,9 @@ _set_state_full (NMDevice *self,
/* IP-related properties are only valid when the device has IP configuration.
* If it no longer does, ensure their change notifications are emitted.
*/
if (ip_config_valid (old_state) && !ip_config_valid (state))
notify_ip_properties (self);
if ( ip_config_valid (old_state)
&& !ip_config_valid (state))
notify_ip_properties (self);
concheck_now = NM_IN_SET (state, NM_DEVICE_STATE_ACTIVATED,
NM_DEVICE_STATE_DISCONNECTED)
@ -15842,10 +15843,6 @@ _set_state_full (NMDevice *self,
concheck_update_interval (self, AF_INET, concheck_now);
concheck_update_interval (self, AF_INET6, concheck_now);
/* Dispose of the cached activation request */
if (req)
g_object_unref (req);
priv->in_state_changed = FALSE;
if ((old_state > NM_DEVICE_STATE_UNMANAGED) != (state > NM_DEVICE_STATE_UNMANAGED))