Subject: [ libssh2-Bugs-2929647 ] memory leak when connection is lost

[ libssh2-Bugs-2929647 ] memory leak when connection is lost

From: SourceForge.net <noreply_at_sourceforge.net>
Date: Sun, 14 Feb 2010 23:16:11 +0000

Bugs item #2929647, was opened at 2010-01-11 08:38
Message generated for change (Comment added) made by bagder
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=703942&aid=2929647&group_id=125852

Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: None
Group: None
>Status: Closed
>Resolution: Fixed
Priority: 5
Private: No
Submitted By: Yoichi Iwaki (yoichiwo7)
>Assigned to: Daniel Stenberg (bagder)
Summary: memory leak when connection is lost

Initial Comment:
Version: libssh2-1.2.2

Memory for outgoing packet buffer is allocated to (session->packet->outbuf) on transport.c:737.
When the connection is lost during the session, _libssh2_transport_write() will keep the data
to send it after (transport.c:783-794).

The problem is, when I call libssh2_session_free() to cleanup the resouces, it won't
cleanup the kept memory allocated to (session->packet->outbuf).

By cleaning up (session->packet->outbuf) in session_free(), the problem could be fixed.
(Please see the diff file)

----------------------------------------------------------------------

Comment By: Daniel Stenberg (bagder)
Date: 2010-02-15 00:16

Message:
Thanks for your report and help in improving libssh2!

A fix has just been committed to the source code repo, this case is now
considered fixed and closed!

----------------------------------------------------------------------

You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=703942&aid=2929647&group_id=125852
_______________________________________________
libssh2-devel http://cool.haxx.se/cgi-bin/mailman/listinfo/libssh2-devel
Received on 2010-02-15