team: fix possible crash by ensuring teamd context is cleared

teamd_cleanup() might get called multiple times, and since the rest
of the function is safe against multi-calls, make priv->tdc safe
against being called again too.
This commit is contained in:
Dan Williams 2013-11-08 15:34:55 -06:00
parent 788eed99de
commit 6b6265ebeb

View file

@ -270,6 +270,7 @@ teamd_cleanup (NMDevice *dev, gboolean device_state_failed)
if (priv->tdc) {
teamdctl_disconnect (priv->tdc);
teamdctl_free (priv->tdc);
priv->tdc = NULL;
}
#endif