From 36d129ac45e9c5121a8c832706f42bbc94a1e387 Mon Sep 17 00:00:00 2001 From: Othmar Gsenger Date: Tue, 11 Dec 2007 15:47:35 +0000 Subject: fixed connection list memory leak kd and sequence window created by createConnection --- anytun.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'anytun.cpp') diff --git a/anytun.cpp b/anytun.cpp index d6e0dbf..f4737f8 100644 --- a/anytun.cpp +++ b/anytun.cpp @@ -80,12 +80,12 @@ uint8_t salt[] = { void createConnection(const std::string & remote_host , u_int16_t remote_port, ConnectionList & cl, u_int16_t seqSize) { - SeqWindow seq(seqSize); + SeqWindow * seq= new SeqWindow(seqSize); seq_nr_t seq_nr_=0; - KeyDerivation kd; + KeyDerivation * kd = new KeyDerivation; // kd.init(Buffer(key, sizeof(key)), Buffer(salt, sizeof(salt))); cLog.msg(Log::PRIO_NOTICE) << "added connection remote host " << remote_host << ":" << remote_port; - ConnectionParam connparam ( kd, seq, seq_nr_, remote_host, remote_port); + ConnectionParam connparam ( (*kd), (*seq), seq_nr_, remote_host, remote_port); cl.addConnection(connparam,std::string("default")); } -- cgit v1.2.3