Fixed leak in sftp_symlink_ex(),

result for READLINK and REALPATH not freed unless there was an error.
This commit is contained in:
Sara Golemon 2004-12-24 20:19:42 +00:00
parent 99795a165e
commit a1e649b507
2 changed files with 3 additions and 0 deletions

2
README
View File

@ -8,6 +8,8 @@ Version 0.4
Fixed leak in sftp_open_ex(), handle->handle not freed in handle_close().
Fixed leak in sftp_symlink_ex(), result for READLINK and REALPATH not freed unless there was an error.
Version 0.3
-----------

View File

@ -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;
}