]> git.armaanb.net Git - opendoas.git/blobdiff - pam.c
simplify makefile
[opendoas.git] / pam.c
diff --git a/pam.c b/pam.c
index c6f63f2f516dbdfd181da204db9e302b50a6fecd..81483800655243219612ccbaf51b39b258b7018d 100644 (file)
--- a/pam.c
+++ b/pam.c
@@ -124,7 +124,7 @@ fail:
        for (i = 0; i < nmsgs; i++) {
                if (rsp[i].resp == NULL)
                        continue;
-               switch (style = msgs[i]->msg_style) {
+               switch (msgs[i]->msg_style) {
                case PAM_PROMPT_ECHO_OFF:
                case PAM_PROMPT_ECHO_ON:
                        explicit_bzero(rsp[i].resp, strlen(rsp[i].resp));
@@ -132,6 +132,7 @@ fail:
                }
                rsp[i].resp = NULL;
        }
+       free(rsp);
 
        return PAM_CONV_ERR;
 }