1
0
mirror of https://git.tartarus.org/simon/putty.git synced 2025-06-30 19:12:48 -05:00

Fix a few memory leaks spotted by Coverity.

This commit is contained in:
Simon Tatham
2021-04-09 17:55:31 +01:00
parent c5724c46a0
commit fc8550c07b
3 changed files with 11 additions and 4 deletions

View File

@ -357,10 +357,14 @@ static void serial_reconfig(Backend *be, Conf *conf)
{
Serial *serial = container_of(be, Serial, backend);
/*
* FIXME: what should we do if this returns an error?
*/
serial_configure(serial, conf);
char *err = serial_configure(serial, conf);
if (err) {
/*
* FIXME: apart from freeing the dynamically allocated
* message, what should we do if this returns an error?
*/
sfree(err);
}
}
static void serial_select_result(int fd, int event)