X-Git-Url: https://git.distorted.org.uk/u/mdw/putty/blobdiff_plain/0d201bfb8495ca95cac852a499a0097495b58a6c..ab7a09e5609c979fa3cef449e59a1af615d66f2d:/ssh.c diff --git a/ssh.c b/ssh.c index bfc10b02..bdab733f 100644 --- a/ssh.c +++ b/ssh.c @@ -1062,12 +1062,14 @@ static void parse_ttymodes(Ssh ssh, * follows it, or 'A' indicating that we should pass the * value through from the local environment via get_ttymode. */ - if (val[0] == 'A') + if (val[0] == 'A') { val = get_ttymode(ssh->frontend, key); - else - val++; /* skip the 'V' */ - if (val) - do_mode(data, key, val); + if (val) { + do_mode(data, key, val); + sfree(val); + } + } else + do_mode(data, key, val + 1); /* skip the 'V' */ } }