=================================================================== RCS file: /cvsrepo/anoncvs/cvs/src/usr.bin/ssh/clientloop.c,v retrieving revision 1.197 retrieving revision 1.198 diff -u -r1.197 -r1.198 --- src/usr.bin/ssh/clientloop.c 2008/06/12 04:17:47 1.197 +++ src/usr.bin/ssh/clientloop.c 2008/06/12 15:19:17 1.198 @@ -1,4 +1,4 @@ -/* $OpenBSD: clientloop.c,v 1.197 2008/06/12 04:17:47 djm Exp $ */ +/* $OpenBSD: clientloop.c,v 1.198 2008/06/12 15:19:17 djm Exp $ */ /* * Author: Tatu Ylonen * Copyright (c) 1995 Tatu Ylonen , Espoo, Finland @@ -1252,6 +1252,13 @@ return (void *)ret; } +/* Free the escape filter context on channel free */ +void +client_filter_cleanup(int cid, void *ctx) +{ + xfree(ctx); +} + int client_simple_escape_filter(Channel *c, char *buf, int len) { @@ -1349,6 +1356,7 @@ if (escape_char_arg != SSH_ESCAPECHAR_NONE) channel_register_filter(session_ident, client_simple_escape_filter, NULL, + client_filter_cleanup, client_new_escape_filter_ctx(escape_char_arg)); if (session_ident != -1) channel_register_cleanup(session_ident,