Fixes pointer was allocated with malloc (by libssh) but freed with
delete. This is not safe and causes undefined behavior.
Build and run kio_sftp with address sanitizer
Use ssh_string_free_char ?
"The caller needs to free the memory using ssh_string_free_char()."
Use ssh_string_free_char instead of free as documentated by libssh
Good catch ;) I have changed it to call ssh_string_free_char instead