On Wed, 14 Mar 2007, Dan Fandrich wrote: > I've spotted (thanks to valgrind) what looks like a memory leak in libssh2. > The pointer session->packet->payload (a.k.a. p->payload) is allocated in > libssh2_packet_read(), but it doesn't seem to be freed anywhere in the > non-error, non-compression path.
Ouch. While I wrote the current version of libssh2_packet_read(), I do believe the current approach was used before as well and libssh2_packet_add() does seem to assume an allocated pointer getting passed in as it frees it on several places when an error occurs and it uses the mere pointer when it adds it to its queue... So it seems it gets lost when in the queue or possibly not freed when getting pulled out from the queue at a later time. Sara or anyone else? Care to explain how that memory is supposed to be freed? Dan, does this problem occur when running one of the sample apps against a plain standard OpenSSH server or does it require anything particular? ------------------------------------------------------------------------- Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys-and earn cash http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV _______________________________________________ libssh2-devel mailing list libssh2-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/libssh2-devel