From Peter Johansson:

I have provided a patch for a crash that occurs in uat_gui.c if from the
"Edit preferences..." button when you choose Protocols -> DLT_USER ->
the "Edit..." button -> the "New" button -> the "Cancel" button.
The crash happens because dd gets freed prior to traversing its internal
structure, hence I moved the call to g_free for dd beneath the traversal
of the dd internals.



svn path=/trunk/; revision=20813
This commit is contained in:
Luis Ontanon 2007-02-14 19:21:37 +00:00
parent 958a67763d
commit c63b0a6bc6
1 changed files with 2 additions and 1 deletions

View File

@ -371,10 +371,11 @@ static gboolean uat_cancel_dlg_cb(GtkWidget *win _U_, gpointer user_data) {
if (dd->is_new) g_free(dd->rec);
g_ptr_array_free(dd->entries,TRUE);
window_destroy(GTK_WIDGET(dd->win));
g_free(dd);
while (dd->tobe_freed->len) g_free( g_ptr_array_remove_index_fast(dd->tobe_freed, dd->tobe_freed->len - 1 ) );
g_free(dd);
return TRUE;
}