mirror of
https://git.tartarus.org/simon/putty.git
synced 2025-02-03 21:52:24 +00:00
Fix a few memory leaks spotted by Coverity.
This commit is contained in:
parent
c5724c46a0
commit
fc8550c07b
@ -2338,6 +2338,7 @@ int pageant_reencrypt_key(struct pageant_pubkey *key, char **retstr)
|
|||||||
|
|
||||||
if (key->ssh_version == 1) {
|
if (key->ssh_version == 1) {
|
||||||
*retstr = dupstr("Can't re-encrypt an SSH-1 key");
|
*retstr = dupstr("Can't re-encrypt an SSH-1 key");
|
||||||
|
pageant_client_op_free(pco);
|
||||||
return PAGEANT_ACTION_FAILURE;
|
return PAGEANT_ACTION_FAILURE;
|
||||||
} else {
|
} else {
|
||||||
put_byte(pco, SSH2_AGENTC_EXTENSION);
|
put_byte(pco, SSH2_AGENTC_EXTENSION);
|
||||||
|
12
unix/uxser.c
12
unix/uxser.c
@ -357,10 +357,14 @@ static void serial_reconfig(Backend *be, Conf *conf)
|
|||||||
{
|
{
|
||||||
Serial *serial = container_of(be, Serial, backend);
|
Serial *serial = container_of(be, Serial, backend);
|
||||||
|
|
||||||
/*
|
char *err = serial_configure(serial, conf);
|
||||||
* FIXME: what should we do if this returns an error?
|
if (err) {
|
||||||
*/
|
/*
|
||||||
serial_configure(serial, conf);
|
* 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)
|
static void serial_select_result(int fd, int event)
|
||||||
|
@ -127,6 +127,8 @@ void cli_main_loop(cliloop_pre_t pre, cliloop_post_t post, void *ctx)
|
|||||||
if (!post(ctx, extra_handle_index))
|
if (!post(ctx, extra_handle_index))
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
sfree(sklist);
|
||||||
}
|
}
|
||||||
|
|
||||||
bool cliloop_null_pre(void *vctx, const HANDLE **eh, size_t *neh)
|
bool cliloop_null_pre(void *vctx, const HANDLE **eh, size_t *neh)
|
||||||
|
Loading…
Reference in New Issue
Block a user