summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Haller <thaller@redhat.com>2017-03-20 11:28:14 +0100
committerThomas Haller <thaller@redhat.com>2017-03-20 11:28:58 +0100
commitc033330c413b04b0897a5a557deeba216ea89e2c (patch)
tree5de52ae155c96273a479e8b24aebf849e8c43555
parentb33b15ae76c9f60c04648f4d01ecdc7b887f675b (diff)
downloadNetworkManager-c033330c413b04b0897a5a557deeba216ea89e2c.tar.gz
libnm: fix memleak of GUdevDevice in get_bus_name()
Fixes: f7b1b2820245aff26da0c2c946b55752e91112e5
-rw-r--r--libnm-glib/nm-device.c1
-rw-r--r--libnm/nm-device.c1
2 files changed, 2 insertions, 0 deletions
diff --git a/libnm-glib/nm-device.c b/libnm-glib/nm-device.c
index b5575e3908..626c84a97d 100644
--- a/libnm-glib/nm-device.c
+++ b/libnm-glib/nm-device.c
@@ -1960,6 +1960,7 @@ get_bus_name (NMDevice *device)
*/
priv->bus_name = g_strdup ("");
}
+ g_object_unref (udevice);
out:
if (*priv->bus_name)
diff --git a/libnm/nm-device.c b/libnm/nm-device.c
index 02241567f9..9420dfb132 100644
--- a/libnm/nm-device.c
+++ b/libnm/nm-device.c
@@ -1770,6 +1770,7 @@ get_bus_name (NMDevice *device)
*/
priv->bus_name = g_strdup ("");
}
+ g_object_unref (udevice);
out:
if (*priv->bus_name)