valgrind output: ==00:00:16:59.781 2189== 19 bytes in 1 blocks are indirectly lost in loss record 1 of 3 ==00:00:16:59.781 2189== at 0x401B504: malloc (vg_replace_malloc.c:149) ==00:00:16:59.781 2189== by 0x804E2F1: curl_domalloc (memdebug.c:136) ==00:00:16:59.781 2189== by 0x806D83C: libssh2_malloc (ssh.c:281) ==00:00:16:59.781 2189== by 0x80878A2: libssh2_channel_open_ex (channel.c:154 ) ==00:00:16:59.781 2189== by 0x808DDBB: libssh2_scp_send_ex (scp.c:599) ==00:00:16:59.781 2189== by 0x8070CF9: ssh_statemach_act (ssh.c:1762) ==00:00:16:59.781 2189== by 0x8071305: ssh_easy_statemach (ssh.c:1987) ==00:00:16:59.782 2189== by 0x80714FA: scp_perform (ssh.c:2109) ==00:00:16:59.782 2189== by 0x8071634: ssh_do (ssh.c:2167) ==00:00:16:59.782 2189== by 0x805996E: Curl_do (url.c:4566) ==00:00:16:59.782 2189== by 0x8062B9A: Curl_perform (transfer.c:2364) ==00:00:16:59.782 2189== by 0x804D9BC: curl_easy_perform (easy.c:509) ==00:00:16:59.782 2189== by 0x804B79C: AMSC::CFileXferImple::upload(std::list > const&, std::string const&, bool) (a mscfilexfer.cpp:249) ==00:00:16:59.783 2189== by 0x804C03C: AMSC::CFileXfer::upload(std::list > const&, std::string const&, bool) (amscfi lexfer.cpp:476) ==00:00:16:59.783 2189== by 0x804CEEE: main (xfer_main.cpp:199) ==00:00:16:59.783 2189== ==00:00:16:59.783 2189== ==00:00:16:59.783 2189== 347 (328 direct, 19 indirect) bytes in 2 blocks are def initely lost in loss record 2 of 3 ==00:00:16:59.783 2189== at 0x401B504: malloc (vg_replace_malloc.c:149) ==00:00:16:59.783 2189== by 0x804E2F1: curl_domalloc (memdebug.c:136) ==00:00:16:59.783 2189== by 0x806D83C: libssh2_malloc (ssh.c:281) ==00:00:16:59.783 2189== by 0x8087871: libssh2_channel_open_ex (channel.c:144 ) ==00:00:16:59.783 2189== by 0x808DDBB: libssh2_scp_send_ex (scp.c:599) ==00:00:16:59.784 2189== by 0x8070CF9: ssh_statemach_act (ssh.c:1762) ==00:00:16:59.784 2189== by 0x8071305: ssh_easy_statemach (ssh.c:1987) ==00:00:16:59.784 2189== by 0x80714FA: scp_perform (ssh.c:2109) ==00:00:16:59.784 2189== by 0x8071634: ssh_do (ssh.c:2167) ==00:00:16:59.784 2189== by 0x805996E: Curl_do (url.c:4566) ==00:00:16:59.784 2189== by 0x8062B9A: Curl_perform (transfer.c:2364) ==00:00:16:59.784 2189== by 0x804D9BC: curl_easy_perform (easy.c:509) ==00:00:16:59.784 2189== by 0x804B79C: AMSC::CFileXferImple::upload(std::list > const&, std::string const&, bool) (a mscfilexfer.cpp:249) ==00:00:16:59.785 2189== by 0x804C03C: AMSC::CFileXfer::upload(std::list > const&, std::string const&, bool) (amscfi lexfer.cpp:476) ==00:00:16:59.785 2189== by 0x804CEEE: main (xfer_main.cpp:199) ==00:00:16:59.785 2189==