diff --git a/libnm-glib/nm-device.c b/libnm-glib/nm-device.c index 606510639..7bfe5974c 100644 --- a/libnm-glib/nm-device.c +++ b/libnm-glib/nm-device.c @@ -323,8 +323,11 @@ get_product_and_vendor (DBusGConnection *connection, } if (parent && tmp_product && tmp_vendor) { - *product = g_strdup (tmp_product); - *vendor = g_strdup (tmp_vendor); + *product = tmp_product; + *vendor = tmp_vendor; + } else { + g_free (tmp_product); + g_free (tmp_vendor); } g_object_unref (proxy);