From 4c139e23e918c7a378953a3f9fc6ec7c927cf6f5 Mon Sep 17 00:00:00 2001 From: Andreas Schneider Date: Thu, 24 Mar 2016 09:23:31 +0100 Subject: [PATCH] pam_winbind: Use the correct type to check the pam_parse() return code Signed-off-by: Andreas Schneider Reviewed-by: Guenther Deschner --- nsswitch/pam_winbind.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) 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;