Commit 0525fb7ef3cb347e20db8582dcfc9c4c67bd9267

yorah 2013-06-17T14:31:14

cred: deploy git__memzero to clear memory holding a password

diff --git a/src/transports/cred.c b/src/transports/cred.c
index 4916c6e..ba5de6e 100644
--- a/src/transports/cred.c
+++ b/src/transports/cred.c
@@ -17,7 +17,7 @@ static void plaintext_free(struct git_cred *cred)
 	git__free(c->username);
 
 	/* Zero the memory which previously held the password */
-	memset(c->password, 0x0, pass_len);
+	git__memzero(c->password, pass_len);
 	git__free(c->password);
 
 	memset(c, 0, sizeof(*c));
@@ -73,7 +73,7 @@ static void ssh_keyfile_passphrase_free(struct git_cred *cred)
 
     if (c->passphrase) {
         /* Zero the memory which previously held the passphrase */
-        memset(c->passphrase, 0x0, pass_len);
+        git__memzero(c->passphrase, pass_len);
         git__free(c->passphrase);
     }