summaryrefslogtreecommitdiffstats
path: root/ldap/synctools/passwordsync/passhand.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'ldap/synctools/passwordsync/passhand.cpp')
-rw-r--r--ldap/synctools/passwordsync/passhand.cpp10
1 files changed, 8 insertions, 2 deletions
diff --git a/ldap/synctools/passwordsync/passhand.cpp b/ldap/synctools/passwordsync/passhand.cpp
index 7d5af3cd..ddad1977 100644
--- a/ldap/synctools/passwordsync/passhand.cpp
+++ b/ldap/synctools/passwordsync/passhand.cpp
@@ -200,11 +200,17 @@ exit:
int clearSet(PASS_INFO_LIST* passInfoList)
{
- // ToDo: zero out memory
+ while (!passInfoList->empty()) {
+ PASS_INFO& pi = passInfoList->back();
+ SecureZeroMemory(pi.password, strlen(pi.password));
+ free(pi.password);
+ free(pi.username);
+ passInfoList->pop_back();
+ }
passInfoList->clear();
- return -1;
+ return 0;
}
int encrypt(char* plainTextBuf, int plainTextLen, char* cipherTextBuf, int cipherTextLen, int* resultTextLen)