NetworkManager r3270 - trunk/libnm-glib



Author: dcbw
Date: Sat Jan 26 05:53:29 2008
New Revision: 3270
URL: http://svn.gnome.org/viewvc/NetworkManager?rev=3270&view=rev

Log:
Fix leak

Modified:
   trunk/libnm-glib/nm-device.c

Modified: trunk/libnm-glib/nm-device.c
==============================================================================
--- trunk/libnm-glib/nm-device.c	(original)
+++ trunk/libnm-glib/nm-device.c	Sat Jan 26 05:53:29 2008
@@ -323,8 +323,11 @@
     }
 
 	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);
 



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]