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

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