summaryrefslogtreecommitdiff
path: root/src/devices/team/nm-device-team.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/devices/team/nm-device-team.c')
-rw-r--r--src/devices/team/nm-device-team.c11
1 files changed, 2 insertions, 9 deletions
diff --git a/src/devices/team/nm-device-team.c b/src/devices/team/nm-device-team.c
index 827a4efad9..c0b83b8442 100644
--- a/src/devices/team/nm-device-team.c
+++ b/src/devices/team/nm-device-team.c
@@ -252,15 +252,8 @@ teamd_cleanup (NMDevice *device, gboolean free_tdc)
{
NMDeviceTeamPrivate *priv = NM_DEVICE_TEAM_GET_PRIVATE (device);
- if (priv->teamd_process_watch) {
- g_source_remove (priv->teamd_process_watch);
- priv->teamd_process_watch = 0;
- }
-
- if (priv->teamd_timeout) {
- g_source_remove (priv->teamd_timeout);
- priv->teamd_timeout = 0;
- }
+ nm_clear_g_source (&priv->teamd_process_watch);
+ nm_clear_g_source (&priv->teamd_timeout);
if (priv->teamd_pid > 0) {
nm_utils_kill_child_async (priv->teamd_pid, SIGTERM, LOGD_TEAM, "teamd", 2000, NULL, NULL);