mirror of
https://git.libssh.org/projects/libssh.git
synced 2025-12-08 03:42:12 +03:00
tests:client: We need to set channel to NULL after we freed it
This fixes an invalid memory read in ssh_channel_get_exit_status() below. Signed-off-by: Andreas Schneider <asn@cryptomilk.org>
This commit is contained in:
@@ -434,7 +434,7 @@ static void torture_freed_channel_get_exit_status(void **state)
|
||||
(channel->flags & SSH_CHANNEL_FLAG_NOT_BOUND)) {
|
||||
channel_freed = true;
|
||||
}
|
||||
ssh_channel_free(channel);
|
||||
SSH_CHANNEL_FREE(channel);
|
||||
|
||||
if (!channel_freed) {
|
||||
rc = ssh_channel_get_exit_status(channel);
|
||||
|
||||
Reference in New Issue
Block a user