nautilus-sendto r341 - in trunk: . src/plugins



Author: hadess
Date: Wed Aug 20 15:27:46 2008
New Revision: 341
URL: http://svn.gnome.org/viewvc/nautilus-sendto?rev=341&view=rev

Log:
2008-08-20  Bastien Nocera  <hadess hadess net>

	* src/plugins/bluetooth.c (validate_destination), (destroy):
	Fix a few leaks checking whether the target device supports
	Obex Push, call it Obex Push as well, and destroy whatever we
	create in the destroy() call



Modified:
   trunk/ChangeLog
   trunk/src/plugins/bluetooth.c

Modified: trunk/src/plugins/bluetooth.c
==============================================================================
--- trunk/src/plugins/bluetooth.c	(original)
+++ trunk/src/plugins/bluetooth.c	Wed Aug 20 15:27:46 2008
@@ -412,14 +412,12 @@
 		      char **error)
 {
 	GError *e = NULL;
-	char *bdaddr, *name, **array;
+	char *bdaddr, **array, **a;
 	gboolean found = TRUE;
 
 	g_return_val_if_fail (error != NULL, FALSE);
 
-	//FIXME shouldn't error if there's no selected device
-
-	if (get_select_device (&name, &bdaddr) == FALSE) {
+	if (get_select_device (NULL, &bdaddr) == FALSE) {
 		*error = g_strdup (_("Programming error, could not find the device in the list"));
 		return FALSE;
 	}
@@ -429,26 +427,32 @@
 			   G_TYPE_STRV, &array, G_TYPE_INVALID);
 	if (e == NULL) {
 		found = FALSE;
-		while (*array) {
-			if (g_str_equal (*array, OBEX_SERVICE_CLASS_NAME) != FALSE) {
+		a = array;
+		while (*a) {
+			if (g_str_equal (*a, OBEX_SERVICE_CLASS_NAME) != FALSE) {
 				found = TRUE;
 				break;
 			}
-			array++;
+			a++;
 		}
 	} else {
 		g_error_free (e);
 	}
 
+	g_strfreev (array);
+	g_free (bdaddr);
+
 	if (found == FALSE)
-		*error = g_strdup_printf (_("Device does not support Obex File Transfer"));
+		*error = g_strdup_printf (_("Device does not support Obex Push file transfer"));
 
 	return found;
 }
 
 static gboolean
 destroy (NstPlugin *plugin){
-	//FIXME
+	g_object_unref (model);
+	gtk_widget_destroy (combobox);
+	g_free (cmd);
 	return TRUE;
 }
 



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