mirror of
https://git.tartarus.org/simon/putty.git
synced 2025-07-14 17:47:33 -05:00
Tidy up 'eventlog_stuff' structure and fix leak.
This is the structure that stores the truncated version of the Event Log data to be displayed by the GTK Event Log dialog. It persists for the lifetime of the parent SSH window, so it was deliberate that it wasn't freed on destruction of the dialog itself, but I also forgot to free it on destruction of the SSH window. (This will be more important in multi-connection process architectures like the OS X port, of course.) While I'm at it, I'll follow my recent practice by exposing the structure tag outside gtkdlg.c so that callers can more easily not confuse it with some other kind of void *.
This commit is contained in:
@ -165,7 +165,7 @@ struct Frontend {
|
||||
int exited;
|
||||
struct unicode_data ucsdata;
|
||||
Conf *conf;
|
||||
void *eventlogstuff;
|
||||
eventlog_stuff *eventlogstuff;
|
||||
guint32 input_event_time; /* Timestamp of the most recent input event. */
|
||||
GtkWidget *dialogs[DIALOG_SLOT_LIMIT];
|
||||
#if GTK_CHECK_VERSION(3,4,0)
|
||||
@ -2470,6 +2470,8 @@ static void delete_inst(Frontend *inst)
|
||||
*/
|
||||
delete_callbacks_for_context(inst);
|
||||
|
||||
eventlogstuff_free(inst->eventlogstuff);
|
||||
|
||||
sfree(inst);
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user