[anjuta/git-shell: 208/373] git: Free the log message for merges at the right time



commit f56d36d29970593ff203c258698ddf1434f1a4d2
Author: James Liggett <jrliggett cox net>
Date:   Wed Mar 24 17:11:28 2010 -0700

    git: Free the log message for merges at the right time
    
    Make sure that it is freed just before the message view is created, not right
    it is copied from the buffer, because at that point we're always giving the
    command a freed chunk of data.

 plugins/git/git-merge-dialog.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)
---
diff --git a/plugins/git/git-merge-dialog.c b/plugins/git/git-merge-dialog.c
index ada22e9..cff856f 100644
--- a/plugins/git/git-merge-dialog.c
+++ b/plugins/git/git-merge-dialog.c
@@ -97,7 +97,7 @@ on_merge_dialog_response (GtkDialog *dialog, gint response_id,
 					return;
 			}
 			
-			g_free (log);
+			
 		}
 
 		gtk_combo_box_get_active_iter (GTK_COMBO_BOX (merge_branch_combo), &iter);
@@ -109,6 +109,7 @@ on_merge_dialog_response (GtkDialog *dialog, gint response_id,
 											   gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (squash_check)));
 		
 		g_free (branch);
+		g_free (log);
 		
 		git_create_message_view (data->plugin);
 		



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