Imported Upstream version 1.7.4p4
[debian/sudo] / auth / sudo_auth.c
index f17ae8d0f11f1349d61eddcb1231613e4faf4c68..69b0a3a661e54d8ff5210019713973888d5a6c6d 100644 (file)
@@ -185,8 +185,9 @@ verify_user(pw, prompt)
                goto cleanup;
        }
 #ifndef AUTH_STANDALONE
-       if (p)
-           zero_bytes(p, strlen(p));
+       if (p == NULL)
+           break;
+       zero_bytes(p, strlen(p));
 #endif
        if (!ISSET(tgetpass_flags, TGP_ASKPASS))
            pass_warn(stderr);