From 7bd325bc426c2d50efc7e0ef90aae6636b51fdf5 Mon Sep 17 00:00:00 2001 From: Dan Williams Date: Sat, 26 Jan 2008 05:53:29 +0000 Subject: [PATCH] Fix leak git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@3270 4912f4e0-d625-0410-9fb7-b9a5a253dbdc --- libnm-glib/nm-device.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) 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);