diff options
-rw-r--r-- | auth-pam.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/auth-pam.c b/auth-pam.c index 289d9f4f7..8efd7b672 100644 --- a/auth-pam.c +++ b/auth-pam.c | |||
@@ -777,6 +777,7 @@ sshpam_init_ctx(Authctxt *authctxt) | |||
777 | { | 777 | { |
778 | struct pam_ctxt *ctxt; | 778 | struct pam_ctxt *ctxt; |
779 | int socks[2]; | 779 | int socks[2]; |
780 | int result; | ||
780 | 781 | ||
781 | debug3("PAM: %s entering", __func__); | 782 | debug3("PAM: %s entering", __func__); |
782 | /* | 783 | /* |
@@ -803,9 +804,10 @@ sshpam_init_ctx(Authctxt *authctxt) | |||
803 | } | 804 | } |
804 | ctxt->pam_psock = socks[0]; | 805 | ctxt->pam_psock = socks[0]; |
805 | ctxt->pam_csock = socks[1]; | 806 | ctxt->pam_csock = socks[1]; |
806 | if (pthread_create(&ctxt->pam_thread, NULL, sshpam_thread, ctxt) == -1) { | 807 | result = pthread_create(&ctxt->pam_thread, NULL, sshpam_thread, ctxt); |
808 | if (result != 0) { | ||
807 | error("PAM: failed to start authentication thread: %s", | 809 | error("PAM: failed to start authentication thread: %s", |
808 | strerror(errno)); | 810 | strerror(result)); |
809 | close(socks[0]); | 811 | close(socks[0]); |
810 | close(socks[1]); | 812 | close(socks[1]); |
811 | free(ctxt); | 813 | free(ctxt); |