diff --git a/ChangeLog b/ChangeLog index 104c3134..6774938c 100644 --- a/ChangeLog +++ b/ChangeLog @@ -4,6 +4,9 @@ Update Scintilla to version 1.76. * scintilla/include/Scintilla.iface: Add this file for plugin authors. + * plugins/vcdiff.c: + Fix two memory leaks and prevent showing two dialog boxes with the + same error message. 2008-03-26 Nick Treleaven diff --git a/plugins/vcdiff.c b/plugins/vcdiff.c index ded585e2..65be9a8c 100644 --- a/plugins/vcdiff.c +++ b/plugins/vcdiff.c @@ -357,10 +357,10 @@ static gchar *make_diff(const gchar *filename, gint cmd) { p_ui->set_statusbar(FALSE, _("No changes were made.")); } - - if (NZV(std_error)) + /* win32_spawn() returns sometimes TRUE but error is set anyway, has to be fixed */ + if (error != NULL) { - p_dialogs->show_msgbox(1, _("VCdiff command sent errors:\n%s\n."), std_error); + g_error_free(error); } } else @@ -378,6 +378,7 @@ static gchar *make_diff(const gchar *filename, gint cmd) argv[0]); } p_ui->set_statusbar(FALSE, _("An error occurred (%s)."), msg); + g_free(msg); } g_free(dir);