cURL / Mailing Lists / curl-library / Single Mail

curl-library

FW: scp upload failure memory leak

From: Jeff Weber <jweber_at_amsc.com>
Date: Wed, 21 May 2008 13:04:45 -0500

> I found a leak when the scp upload times out, due to CURLOPT_TIMEOUT.
> It looks like the LIBSSH2_CHANNEL is leaked. Details below.
>
> Perhaps an excursion through the SSH_SCP_CHANNEL_FREE state could be added.
> Or the SSH_SESSION_DISCONNECT state could call libssh2_channel_free() if the
> channel pointer is not null.
>
> my config:
> interface: easy
> libraries: curl-7.18.1, libssh2-0.18,
> arch: i686
> Linux: 2.4.27
> gcc: gcc-3.3.6 (note: code is C++)

I tried adding a call to
    state(conn, SSH_SCP_CHANNEL_FREE);
inside ssh.c:scp_disconnect() to no avail. I'm not familiar with the details
of the SSH state machine. Any help would be appreciated.

Alternatively, I tried uploading to sftp:// . This protocol also leaks upon a
transfer timeout.

    Jeff

“This e-mail message and any attachments are confidential and may be privileged.
If you are not the intended recipient please notify American Superconductor Corporation immediately by replying to this message or by sending a message
to postmaster_at_amsc.com -- and destroy all copies of this message and any attachments.
Thank you.”
Received on 2008-05-21