Topic "Memory Leak"

Author Message
[View user's profile]

Joined: 2009-05-21
Posts: 8
According to cppcheck, there is a memory leak in the method TKeyGenerator::GetPublicKey() in core/K-e-y-G-e-n.cpp:

[c:\Documents and Settings\Administrator\My Documents\Downloads\winscp421source\core\K-e-y-G-e-n.cpp:342]: (error) Mismatching allocation and deallocation: buffer

Looking at the code confirms it as the memory is allocated as a memory, but not freed as such. Just used "delete []" instead.

PS: I had to change the name of the sourcefile as your spam filter forbids me to post it.
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 26911
Location: Prague, Czechia
Thanks. Will check it. Though this source file is not used at all currently.
Martin Prikryl

You can post new topics in this forum


What is WinSCP?

It is award-winning SFTP client, SCP client, FTPS client and FTP client integrated into one software program for file transfer to FTP server or secure SFTP server. [More]

And it's free!


About donations

$9   $19   $49   $99

About donations


WinSCP Privacy Policy

WinSCP License