From 7c444c09d7bdba1f0409ea8f874ccd283f2daa52 Mon Sep 17 00:00:00 2001 From: Andreas Schneider Date: Wed, 27 Feb 2019 08:32:10 +0100 Subject: sftp: Document how to free memory retruned by sftp_canonicalize_path() Fixes T129 Signed-off-by: Andreas Schneider --- include/libssh/sftp.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'include') diff --git a/include/libssh/sftp.h b/include/libssh/sftp.h index 21512bce..3750e0c6 100644 --- a/include/libssh/sftp.h +++ b/include/libssh/sftp.h @@ -818,7 +818,9 @@ LIBSSH_API int sftp_fsync(sftp_file file); * * @param path The path to be canonicalized. * - * @return The canonicalize path, NULL on error. + * @return A pointer to the newly allocated canonicalized path, + * NULL on error. The caller needs to free the memory + * using ssh_string_free_char(). */ LIBSSH_API char *sftp_canonicalize_path(sftp_session sftp, const char *path); -- cgit v1.2.3