mirror of
https://git.tartarus.org/simon/putty.git
synced 2025-01-24 08:42:25 +00:00
Fixes spotted by Coverity.
A lenof() being applied to a non-array, a couple of missing frees on an error path, and a case in pfd_receive() where we could have gone round a loop again after freeing the port forwarding structure it was working on.
This commit is contained in:
parent
4696f4a40b
commit
d61897414c
2
config.c
2
config.c
@ -1005,7 +1005,7 @@ static void ttymodes_handler(union control *ctrl, void *dlg,
|
||||
char type;
|
||||
|
||||
{
|
||||
const char *types = "ANV";
|
||||
const char types[] = {'A', 'N', 'V'};
|
||||
int button = dlg_radiobutton_get(td->valradio, dlg);
|
||||
assert(button >= 0 && button < lenof(types));
|
||||
type = types[button];
|
||||
|
@ -359,6 +359,7 @@ static void pfd_receive(Plug plug, int urgent, char *data, int len)
|
||||
* close the connection rudely.
|
||||
*/
|
||||
pfd_close(pf);
|
||||
break;
|
||||
}
|
||||
return;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user