mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2026-04-24 23:10:49 +02:00
dhcp: clean source on dispatch failure (fix leak)
The GSource must also be unrefed. Also, first clear the field
before invoking callbacks to the upper layers.
Fixes: 843d696e46 ('dhcp: clean source on dispatch failure')
This commit is contained in:
parent
843d696e46
commit
0549351111
1 changed files with 1 additions and 1 deletions
|
|
@ -1072,8 +1072,8 @@ dhcp4_event_cb (int fd,
|
|||
* a predefined number of times (possibly infinite).
|
||||
*/
|
||||
_LOGE ("error %d dispatching events", r);
|
||||
nm_clear_g_source_inst (&priv->event_source);
|
||||
nm_dhcp_client_set_state (NM_DHCP_CLIENT (self), NM_DHCP_STATE_FAIL, NULL, NULL);
|
||||
priv->event_source = NULL;
|
||||
return G_SOURCE_REMOVE;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue