use safer p_clear when possible.
[apps/madmutt.git] / pgp.c
diff --git a/pgp.c b/pgp.c
index 18931a1..6bd70f2 100644 (file)
--- a/pgp.c
+++ b/pgp.c
@@ -68,7 +68,7 @@ time_t PgpExptime = 0;          /* when does the cached passphrase expire? */
 
 void pgp_void_passphrase (void)
 {
-  memset (PgpPass, 0, sizeof (PgpPass));
+  p_clear(PgpPass, sizeof(PgpPass));
   PgpExptime = 0;
 }
 
@@ -687,7 +687,7 @@ static void pgp_extract_keys_from_attachment (FILE * fp, BODY * top)
     return;
   }
 
-  memset (&s, 0, sizeof (STATE));
+  p_clear(&s, 1);
 
   s.fpin = fp;
   s.fpout = tempfp;
@@ -842,7 +842,7 @@ int pgp_decrypt_mime (FILE * fpin, FILE ** fpout, BODY * b, BODY ** cur)
 
   b = b->parts->next;
 
-  memset (&s, 0, sizeof (s));
+  p_clear(&s, 1);
   s.fpin = fpin;
   mutt_mktemp (tempfile);
   if ((*fpout = safe_fopen (tempfile, "w+")) == NULL) {