libnm: fix memleak of GUdevDevice in get_bus_name()

Fixes: f7b1b28202
This commit is contained in:
Thomas Haller
2017-03-20 11:28:14 +01:00
parent b33b15ae76
commit c033330c41
2 changed files with 2 additions and 0 deletions

View File

@@ -1960,6 +1960,7 @@ get_bus_name (NMDevice *device)
*/
priv->bus_name = g_strdup ("");
}
g_object_unref (udevice);
out:
if (*priv->bus_name)

View File

@@ -1770,6 +1770,7 @@ get_bus_name (NMDevice *device)
*/
priv->bus_name = g_strdup ("");
}
g_object_unref (udevice);
out:
if (*priv->bus_name)