mirror of
https://git.tartarus.org/simon/putty.git
synced 2025-01-27 02:02:26 +00:00
Fix a memory leak in parse_ttymodes() (found by Memcheck/Valgrind).
[originally from svn r9633]
This commit is contained in:
parent
475507e978
commit
df83634e21
12
ssh.c
12
ssh.c
@ -1062,12 +1062,14 @@ static void parse_ttymodes(Ssh ssh,
|
|||||||
* follows it, or 'A' indicating that we should pass the
|
* follows it, or 'A' indicating that we should pass the
|
||||||
* value through from the local environment via get_ttymode.
|
* value through from the local environment via get_ttymode.
|
||||||
*/
|
*/
|
||||||
if (val[0] == 'A')
|
if (val[0] == 'A') {
|
||||||
val = get_ttymode(ssh->frontend, key);
|
val = get_ttymode(ssh->frontend, key);
|
||||||
else
|
if (val) {
|
||||||
val++; /* skip the 'V' */
|
do_mode(data, key, val);
|
||||||
if (val)
|
sfree(val);
|
||||||
do_mode(data, key, val);
|
}
|
||||||
|
} else
|
||||||
|
do_mode(data, key, val + 1); /* skip the 'V' */
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user