mirror of
https://git.tartarus.org/simon/putty.git
synced 2025-01-09 17:38:00 +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.
(cherry picked from commit f4956a1f9d
)
This commit is contained in:
parent
452c49a996
commit
4c24c8dc5a
1
config.c
1
config.c
@ -568,6 +568,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