From 3a6fe7b0487cf16b667815bb9731fcde5a852667 Mon Sep 17 00:00:00 2001 From: Thomas Haller Date: Mon, 20 Mar 2017 11:28:14 +0100 Subject: [PATCH] libnm: fix memleak of GUdevDevice in get_bus_name() Fixes: f7b1b2820245aff26da0c2c946b55752e91112e5 (cherry picked from commit c033330c413b04b0897a5a557deeba216ea89e2c) (cherry picked from commit 6311bf6666540053155c3c4c681f941162ccadb9) (cherry picked from commit 42eb57c0c1a8075a050f748c6246b4c30f1781e4) (cherry picked from commit 90d341e300e6f4b9da8ce7d1a4c6f607636d5e9f) --- libnm-glib/nm-device.c | 1 + libnm/nm-device.c | 1 + 2 files changed, 2 insertions(+) diff --git a/libnm-glib/nm-device.c b/libnm-glib/nm-device.c index bd5d16374e..42196eaea8 100644 --- a/libnm-glib/nm-device.c +++ b/libnm-glib/nm-device.c @@ -1876,6 +1876,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 d3ac705c1c..ed3bfb55c3 100644 --- a/libnm/nm-device.c +++ b/libnm/nm-device.c @@ -1721,6 +1721,7 @@ get_bus_name (NMDevice *device) */ priv->bus_name = g_strdup (""); } + g_object_unref (udevice); out: if (*priv->bus_name)