1
0
mirror of https://git.libssh.org/projects/libssh.git synced 2025-12-08 03:42:12 +03:00

channels: Store exit-signal in channel structure

Signed-off-by: Andreas Schneider <asn@cryptomilk.org>
Reviewed-by: Jakub Jelen <jjelen@redhat.com>
This commit is contained in:
Andreas Schneider
2024-02-02 15:11:57 +01:00
parent fdf8dc2750
commit d40a6448a4

View File

@@ -890,9 +890,15 @@ SSH_PACKET_CALLBACK(channel_rcv_request)
errmsg, errmsg,
lang); lang);
channel->exit.core_dumped = core_dumped;
if (sig != NULL) {
SAFE_FREE(channel->exit.signal);
channel->exit.signal = sig;
}
channel->exit.status = true;
SAFE_FREE(lang); SAFE_FREE(lang);
SAFE_FREE(errmsg); SAFE_FREE(errmsg);
SAFE_FREE(sig);
return SSH_PACKET_USED; return SSH_PACKET_USED;
} }
@@ -1317,6 +1323,7 @@ void ssh_channel_do_free(ssh_channel channel)
ssh_list_free(channel->callbacks); ssh_list_free(channel->callbacks);
channel->callbacks = NULL; channel->callbacks = NULL;
} }
SAFE_FREE(channel->exit.signal);
channel->session = NULL; channel->session = NULL;
SAFE_FREE(channel); SAFE_FREE(channel);