summaryrefslogtreecommitdiff
path: root/channel.h
diff options
context:
space:
mode:
authorMatt Johnston <matt@ucc.asn.au>2013-03-19 23:54:32 +0800
committerMatt Johnston <matt@ucc.asn.au>2013-03-19 23:54:32 +0800
commitb0a27f90247738deac7b943e23624b9721fb1b15 (patch)
treed8c890ca4ca77dc474a487381935c41d07a429e1 /channel.h
parent5d81dccef096981b843d2034cff26ed9db49f733 (diff)
downloaddropbear-b0a27f90247738deac7b943e23624b9721fb1b15.tar.gz
Fix memory leak when direct TCP connections time out on connection.
Long-standing bug probably stemming from the awkwardly named delete_channel() versus remove_channel()
Diffstat (limited to 'channel.h')
-rw-r--r--channel.h6
1 files changed, 2 insertions, 4 deletions
diff --git a/channel.h b/channel.h
index d9e2894..950d4b3 100644
--- a/channel.h
+++ b/channel.h
@@ -61,7 +61,8 @@ struct Channel {
int readfd; /* read from insecure side, written to wire */
int errfd; /* used like writefd or readfd, depending if it's client or server.
Doesn't exactly belong here, but is cleaner here */
- circbuffer *writebuf; /* data from the wire, for local consumption */
+ circbuffer *writebuf; /* data from the wire, for local consumption. Can be
+ initially NULL */
circbuffer *extrabuf; /* extended-data for the program - used like writebuf
but for stderr */
@@ -102,9 +103,6 @@ void chancleanup();
void setchannelfds(fd_set *readfd, fd_set *writefd);
void channelio(fd_set *readfd, fd_set *writefd);
struct Channel* getchannel();
-struct Channel* newchannel(unsigned int remotechan,
- const struct ChanType *type,
- unsigned int transwindow, unsigned int transmaxpacket);
void recv_msg_channel_open();
void recv_msg_channel_request();