1
0
mirror of https://git.libssh.org/projects/libssh.git synced 2025-11-27 13:21:11 +03:00

sftp: Fixed a memory leak in sftp_xstat.

Thanks to dsc for the bug report.
This commit is contained in:
Andreas Schneider
2010-12-27 17:52:24 +01:00
parent 38b87aab08
commit 7c728acd12

View File

@@ -3138,7 +3138,10 @@ static sftp_attributes sftp_xstat(sftp_session sftp, const char *path,
}
if (msg->packet_type == SSH_FXP_ATTRS) {
return sftp_parse_attr(sftp, msg->payload, 0);
sftp_attributes attr = sftp_parse_attr(sftp, msg->payload, 0);
sftp_message_free(msg);
return attr;
} else if (msg->packet_type == SSH_FXP_STATUS) {
status = parse_status_msg(msg);
sftp_message_free(msg);