$ valgrind ./scp_write_nonblock /tmp/scp_src /tmp/test ==11576== Memcheck, a memory error detector ==11576== Copyright (C) 2002-2013, and GNU GPL'd, by Julian Seward et al. ==11576== Using Valgrind-3.10.0 and LibVEX; rerun with -h for copyright info ==11576== Command: ./scp_write_nonblock 10.128.20.101 fsqm_default aaa /tmp/scp_src /tmp/test ==11576== Fingerprint: [XXX] ==11576== Syscall param socketcall.sendto(msg) points to uninitialised byte(s) ==11576== at 0x51475ED: send (send.c:27) ==11576== by 0x4E41838: _libssh2_send (in /usr/lib/x86_64-linux-gnu/libssh2.so.1.0.1) ==11576== by 0x4E4FC91: _libssh2_transport_send (in /usr/lib/x86_64-linux-gnu/libssh2.so.1.0.1) ==11576== by 0x4E3B8A1: _libssh2_channel_process_startup (in /usr/lib/x86_64-linux-gnu/libssh2.so.1.0.1) ==11576== by 0x4E44DC3: scp_send (in /usr/lib/x86_64-linux-gnu/libssh2.so.1.0.1) ==11576== by 0x4E45EC7: libssh2_scp_send_ex (in /usr/lib/x86_64-linux-gnu/libssh2.so.1.0.1) ==11576== by 0x4015DB: main (scp_write_nonblock.c:210) ==11576== Address 0x5b1beda is 17,034 bytes inside a block of size 54,480 alloc'd ==11576== at 0x4C28C20: malloc (vg_replace_malloc.c:296) ==11576== by 0x4E4610D: libssh2_session_init_ex (in /usr/lib/x86_64-linux-gnu/libssh2.so.1.0.1) ==11576== by 0x4013CD: main (scp_write_nonblock.c:153)