Join GitHub today
GitHub is home to over 36 million developers working together to host and review code, manage projects, and build software together.Sign up
libssh backend and homedir memory handling #3402
I did this
I did a debug-build of curl built with the libssh backend and ran the test suite.
I expected the following
I ran into issues because it turns out we try to free the pointer that libssh has returned from its sftp_canonicalize_path function.
All memory allocations in a debug build are subject for extra handling and thus it cannot easily mix with memory allocated without the debug-layer. But when I instead changed to use the "real" free() directly on this pointer, that also caused crashes. I could only make it run fine by completely avoiding the free of that data!
I reported the lack of docs for this function to the libssh project.
(unstable) Debian Linux, got the libssh version from the regular debian repo.