]> git.armaanb.net Git - opendoas.git/blobdiff - pam.c
simplify makefile
[opendoas.git] / pam.c
diff --git a/pam.c b/pam.c
index b921069b195a8a4d89b714f07d264bcc50cfb4d5..81483800655243219612ccbaf51b39b258b7018d 100644 (file)
--- a/pam.c
+++ b/pam.c
@@ -37,7 +37,8 @@
 
 #include <security/pam_appl.h>
 
-#include "includes.h"
+#include "openbsd.h"
+#include "doas.h"
 
 #ifndef HOST_NAME_MAX
 #define HOST_NAME_MAX _POSIX_HOST_NAME_MAX
@@ -123,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));
@@ -131,6 +132,7 @@ fail:
                }
                rsp[i].resp = NULL;
        }
+       free(rsp);
 
        return PAM_CONV_ERR;
 }