From 7d5c0db53abacc9a5ca5a0f56d83dc49c2e64f90 Mon Sep 17 00:00:00 2001 From: Dan Williams Date: Thu, 11 Dec 2014 16:21:38 -0600 Subject: [PATCH] core: fix warning when releasing slaves on exit (rh #1169936) NetworkManager[30304]: (virbr0): bridge port virbr0-nic was detached NetworkManager[30304]: (devices/nm-device.c:962):nm_device_release_one_slave: runtime check failed: (reason == NM_DEVICE_STATE_REASON_NONE) NetworkManager[30304]: (virbr0-nic): released from master virbr0 If the slave is removed, then the master is already cleaned up so NM doesn't need to do anything. 5dd48f fixed that but forgot to update the !configure case, causing the warning but no other problems. Fixes: 5dd48f7527c67b399ac144f594e035216771d61c --- src/devices/nm-device.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/devices/nm-device.c b/src/devices/nm-device.c index 00f886bd3d..23f6d46935 100644 --- a/src/devices/nm-device.c +++ b/src/devices/nm-device.c @@ -959,7 +959,7 @@ nm_device_release_one_slave (NMDevice *self, NMDevice *slave, gboolean configure } if (!configure) { - g_warn_if_fail (reason == NM_DEVICE_STATE_REASON_NONE); + g_warn_if_fail (reason == NM_DEVICE_STATE_REASON_NONE || reason == NM_DEVICE_STATE_REASON_REMOVED); reason = NM_DEVICE_STATE_REASON_NONE; } else if (reason == NM_DEVICE_STATE_REASON_NONE) { g_warn_if_reached ();