diff --git a/src/plugins/auth-pam/auth-pam.c b/src/plugins/auth-pam/auth-pam.c
index 948b6af..d179533 100644
--- a/src/plugins/auth-pam/auth-pam.c
+++ b/src/plugins/auth-pam/auth-pam.c
@@ -779,6 +779,14 @@
     }
     else
     {
+        for (int i = 0; i < num_msg; ++i)
+        {
+            if (aresp[i].resp)
+            {
+                plugin_secure_memzero(aresp[i].resp, strlen(aresp[i].resp));
+                free(aresp[i].resp);
+            }
+        }
         free(aresp);
     }
 
