mirror of
https://git.tartarus.org/simon/putty.git
synced 2025-01-25 01:02:24 +00:00
Fix two small memory leaks in config mechanism.
The memory dangling off ssd->sesslist should be freed when ssd itself goes away, and the font settings ctrlset we delete in gtkcfg.c should be freed as well once it's been removed from its containing array. Thanks to Ranjini Aravind for pointing these out.
This commit is contained in:
parent
1f4dc6faa7
commit
f4956a1f9d
1
config.c
1
config.c
@ -569,6 +569,7 @@ struct sessionsaver_data {
|
||||
static void sessionsaver_data_free(void *ssdv)
|
||||
{
|
||||
struct sessionsaver_data *ssd = (struct sessionsaver_data *)ssdv;
|
||||
get_sesslist(&ssd->sesslist, FALSE);
|
||||
sfree(ssd->savedsession);
|
||||
sfree(ssd);
|
||||
}
|
||||
|
@ -81,6 +81,7 @@ void gtk_setup_config_box(struct controlbox *b, int midsession, void *win)
|
||||
memmove(b->ctrlsets+i, b->ctrlsets+i+1,
|
||||
(b->nctrlsets-i-1) * sizeof(*b->ctrlsets));
|
||||
b->nctrlsets--;
|
||||
ctrl_free_set(s2);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user