Fixed leak in sftp_symlink_ex(),
result for READLINK and REALPATH not freed unless there was an error.
This commit is contained in:
@@ -1336,6 +1336,7 @@ LIBSSH2_API int libssh2_sftp_symlink_ex(LIBSSH2_SFTP *sftp, const char *path, in
|
||||
link_len = target_len;
|
||||
}
|
||||
memcpy(target, data + 13, link_len);
|
||||
LIBSSH2_FREE(session, data);
|
||||
|
||||
return link_len;
|
||||
}
|
||||
|
Reference in New Issue
Block a user