[file-roller] crash on exit after using Open With



commit ced6c25a93df7cc0ded59cc299a577441730faa3
Author: Edward Sheldrake <ejsheldrake gmail com>
Date:   Fri Apr 22 15:54:26 2011 +0100

    crash on exit after using Open With
    
    Fix double-free on exit after open with.
    From fr_window_open_extracted_files line 8242, the file list points to a list
    in a CommandData in the CommandList, which are freed on exit.
    
    [bug #648472]

 src/dlg-open-with.c |   12 ++----------
 1 files changed, 2 insertions(+), 10 deletions(-)
---
diff --git a/src/dlg-open-with.c b/src/dlg-open-with.c
index 52f3b0a..42ac818 100644
--- a/src/dlg-open-with.c
+++ b/src/dlg-open-with.c
@@ -36,14 +36,6 @@ typedef struct {
 
 
 static void
-open_data_free (OpenData *o_data)
-{
-	path_list_free (o_data->file_list);
-	g_free (o_data);
-}
-
-
-static void
 app_chooser_response_cb (GtkDialog *dialog,
 			 int        response_id,
 			 gpointer   user_data)
@@ -58,13 +50,13 @@ app_chooser_response_cb (GtkDialog *dialog,
 			fr_window_open_files_with_application (o_data->window, o_data->file_list, app_info);
 			g_object_unref (app_info);
 		}
-		open_data_free (o_data);
+		g_free (o_data);
 		gtk_widget_destroy (GTK_WIDGET (dialog));
 		break;
 
 	case GTK_RESPONSE_CANCEL:
 	case GTK_RESPONSE_DELETE_EVENT:
-		open_data_free (o_data);
+		g_free (o_data);
 		gtk_widget_destroy (GTK_WIDGET (dialog));
 		break;
 



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