diff --git a/config.c b/config.c index 220c1aa8..efe1ff1e 100644 --- a/config.c +++ b/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]; diff --git a/portfwd.c b/portfwd.c index febd8af9..b68e4bb8 100644 --- a/portfwd.c +++ b/portfwd.c @@ -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; diff --git a/psftp.c b/psftp.c index aa397181..e4e77c3a 100644 --- a/psftp.c +++ b/psftp.c @@ -1050,6 +1050,8 @@ int sftp_cmd_ls(struct sftp_command *cmd) if (dirh == NULL) { printf("Unable to open %s: %s\n", dir, fxp_error()); + sfree(cdir); + sfree(unwcdir); return 0; } else { nnames = namesize = 0;