From: Andreas Schneider Date: Thu, 24 Mar 2016 08:23:31 +0000 (+0100) Subject: pam_winbind: Use the correct type to check the pam_parse() return code X-Git-Tag: tdb-1.3.9~94 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=4c139e23e918c7a378953a3f9fc6ec7c927cf6f5;p=thirdparty%2Fsamba.git pam_winbind: Use the correct type to check the pam_parse() return code Signed-off-by: Andreas Schneider Reviewed-by: Guenther Deschner --- diff --git a/nsswitch/pam_winbind.c b/nsswitch/pam_winbind.c index b83a2762092..745735fcd2d 100644 --- a/nsswitch/pam_winbind.c +++ b/nsswitch/pam_winbind.c @@ -551,6 +551,7 @@ static int _pam_winbind_init_context(pam_handle_t *pamh, struct pwb_context **ctx_p) { struct pwb_context *r = NULL; + int ctrl_code; #ifdef HAVE_GETTEXT textdomain_init(); @@ -567,11 +568,12 @@ static int _pam_winbind_init_context(pam_handle_t *pamh, r->flags = flags; r->argc = argc; r->argv = argv; - r->ctrl = _pam_parse(pamh, flags, argc, argv, type, &r->dict); - if (r->ctrl == -1) { + ctrl_code = _pam_parse(pamh, flags, argc, argv, type, &r->dict); + if (ctrl_code == -1) { TALLOC_FREE(r); return PAM_SYSTEM_ERR; } + r->ctrl = ctrl_code; *ctx_p = r;