Free memory before exiting. Based on patch from Thorsten Horstmann.

Client side is not complete.
This commit is contained in:
Matt Johnston
2015-02-24 22:01:33 +08:00
parent 4b1f5ec7c2
commit 21bed0d21a
6 changed files with 67 additions and 15 deletions

View File

@@ -787,9 +787,11 @@ static int ptycommand(struct Channel *channel, struct ChanSess *chansess) {
TRACE(("back to normal sigchld"))
/* Revert to normal sigchld handling */
/*
if (signal(SIGCHLD, SIG_DFL) == SIG_ERR) {
dropbear_exit("signal() error");
}
*/
/* redirect stdin/stdout/stderr */
close(chansess->master);
@@ -1005,9 +1007,11 @@ void svr_chansessinitialise() {
sa_chld.sa_handler = sesssigchild_handler;
sa_chld.sa_flags = SA_NOCLDSTOP;
sigemptyset(&sa_chld.sa_mask);
/*
if (sigaction(SIGCHLD, &sa_chld, NULL) < 0) {
dropbear_exit("signal() error");
}
*/
}