mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2025-12-28 16:50:16 +01:00
Don't try to unref a NULL GIOChannel
git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@3456 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
This commit is contained in:
parent
013251281f
commit
96d96766fb
1 changed files with 5 additions and 2 deletions
|
|
@ -304,10 +304,13 @@ nm_serial_device_close (NMSerialDevice *device)
|
|||
if (priv->fd) {
|
||||
nm_debug ("Closing device '%s'", nm_device_get_iface (NM_DEVICE (device)));
|
||||
|
||||
g_io_channel_unref (priv->channel);
|
||||
if (priv->channel) {
|
||||
g_io_channel_unref (priv->channel);
|
||||
priv->channel = NULL;
|
||||
}
|
||||
|
||||
ioctl (priv->fd, TCSETA, &priv->old_t);
|
||||
close (priv->fd);
|
||||
|
||||
priv->fd = 0;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue