diff svr-chansession.c @ 1040:2b4fd440399d

Free memory before exiting. Based on patch from Thorsten Horstmann. Client side is not complete.
author Matt Johnston <matt@ucc.asn.au>
date Tue, 24 Feb 2015 22:01:33 +0800
parents d3925ed45a85
children 9699b9438ad9
line wrap: on
line diff
--- a/svr-chansession.c	Tue Feb 24 20:53:32 2015 +0800
+++ b/svr-chansession.c	Tue Feb 24 22:01:33 2015 +0800
@@ -787,9 +787,11 @@
 		
 		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 @@
 	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");
 	}
+	*/
 	
 }