projects
/
u
/
mdw
/
putty
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Add the ability to close sessions. This adds *_free() functions to most
[u/mdw/putty]
/
rlogin.c
diff --git
a/rlogin.c
b/rlogin.c
index
ff2af31
..
89a2bfe
100644
(file)
--- a/
rlogin.c
+++ b/
rlogin.c
@@
-177,6
+177,15
@@
static char *rlogin_init(void *frontend_handle, void **backend_handle,
return NULL;
}
return NULL;
}
+static void rlogin_free(void *handle)
+{
+ Rlogin rlogin = (Rlogin) handle;
+
+ if (rlogin->s)
+ sk_close(rlogin->s);
+ sfree(rlogin);
+}
+
/*
* Stub routine (we don't have any need to reconfigure this backend).
*/
/*
* Stub routine (we don't have any need to reconfigure this backend).
*/
@@
-282,6
+291,7
@@
static int rlogin_exitcode(void *handle)
Backend rlogin_backend = {
rlogin_init,
Backend rlogin_backend = {
rlogin_init,
+ rlogin_free,
rlogin_reconfig,
rlogin_send,
rlogin_sendbuffer,
rlogin_reconfig,
rlogin_send,
rlogin_sendbuffer,