diff options
author | Beniamino Galvani <bgalvani@redhat.com> | 2020-02-29 19:14:10 +0100 |
---|---|---|
committer | Beniamino Galvani <bgalvani@redhat.com> | 2020-03-03 09:34:04 +0100 |
commit | 843d696e46d96eb30642d872ba6c1a46c900ca14 (patch) | |
tree | 7ca13b05245c55d67db54b3fd91999d1353a1989 /src/dhcp/nm-dhcp-nettools.c | |
parent | 105abf27c12074952872678463b2cf331150a2ce (diff) | |
download | NetworkManager-843d696e46d96eb30642d872ba6c1a46c900ca14.tar.gz |
dhcp: clean source on dispatch failure
Fix the following warning:
NetworkManager[1524461]: Source ID 3844 was not found when attempting to remove it
g_logv (log_domain=0x7f2816fa676e "GLib", log_level=G_LOG_LEVEL_CRITICAL, format=<optimized out>, args=args@entry=0x7ffe697374d0) at gmessages.c:1391
g_log (log_domain=log_domain@entry=0x7f2816fa676e "GLib", log_level=log_level@entry=G_LOG_LEVEL_CRITICAL, format=format@entry=0x7f2816fae240 "Source ID %u was not found when attempting to remove it") at gmessages.c:1432
g_source_remove (tag=519) at gmain.c:2352
nm_clear_g_source (id=<optimized out>) at ./shared/nm-glib-aux/nm-macros-internal.h:1198
dispose (object=0x55f7289b1ca0) at src/dhcp/nm-dhcp-nettools.c:1433
g_object_unref (_object=<optimized out>) at gobject.c:3303
g_object_unref (_object=0x55f7289b1ca0) at gobject.c:3232
dhcp4_cleanup (self=self@entry=0x55f728af3b20, cleanup_type=cleanup_type@entry=CLEANUP_TYPE_DECONFIGURE, release=release@entry=0) at src/devices/nm-device.c:7565
...
Fixes: 45521b1b3872 ('dhcp: nettools: move to failed state if event dispatch fails')
Diffstat (limited to 'src/dhcp/nm-dhcp-nettools.c')
-rw-r--r-- | src/dhcp/nm-dhcp-nettools.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/dhcp/nm-dhcp-nettools.c b/src/dhcp/nm-dhcp-nettools.c index ff73282489..dfa51ec73e 100644 --- a/src/dhcp/nm-dhcp-nettools.c +++ b/src/dhcp/nm-dhcp-nettools.c @@ -1073,6 +1073,7 @@ dhcp4_event_cb (int fd, */ _LOGE ("error %d dispatching events", r); nm_dhcp_client_set_state (NM_DHCP_CLIENT (self), NM_DHCP_STATE_FAIL, NULL, NULL); + priv->event_source = NULL; return G_SOURCE_REMOVE; } |