[originally from svn r9633]
* follows it, or 'A' indicating that we should pass the
* value through from the local environment via get_ttymode.
*/
* follows it, or 'A' indicating that we should pass the
* value through from the local environment via get_ttymode.
*/
val = get_ttymode(ssh->frontend, key);
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' */