Commit 9e8bd2e1 authored by Ulrich Sibiller's avatar Ulrich Sibiller

Loop.cpp: fix memleak happening with unknown tcp host

==28424== 6 bytes in 1 blocks are definitely lost in loss record 1 of 7 ==28424== at 0x4C2DB8F: malloc (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so) ==28424== by 0x541D4D9: strndup (strndup.c:43) ==28424== by 0x4E8AD4B: ChannelEndPoint::getTCPHostAndPort(char**, long*) const (ChannelEndPoint.cpp:311) ==28424== by 0x4EBE9CC: ConnectToRemote(ChannelEndPoint&) (Loop.cpp:6656) ==28424== by 0x4EB0A4C: SetupProxyConnection() (Loop.cpp:3205) ==28424== by 0x4EDC81A: handleNegotiationInLoop(int&, fd_set&, fd_set&, timeval&) (Loop.cpp:14308) ==28424== by 0x4EAE40F: NXTransPrepare (Loop.cpp:2576) ==28424== by 0x4EAA801: NXTransContinue (Loop.cpp:1610) ==28424== by 0x4EB50C9: WaitCleanup() (Loop.cpp:4436) ==28424== by 0x4EA9507: NXTransProxy (Loop.cpp:1235) ==28424== by 0x400B2A: main (Main.c:111)
parent ce293647
......@@ -6482,6 +6482,7 @@ int PrepareProxyConnectionTCP(char** hostName, long int* portNum, int* timeout,
cerr << "Error" << ": Unknown remote host '"
<< *hostName << "'.\n";
SAFE_FREE(*hostName);
HandleCleanup();
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment