2
0

NULL out free'ed references.

This commit is contained in:
Maarten Billemont
2017-08-23 00:01:23 -04:00
parent 0a42579d9e
commit a8949ca07e
12 changed files with 171 additions and 172 deletions

View File

@@ -56,7 +56,7 @@ int main(int argc, char *const argv[]) {
// 2. calculate the site password.
const char *sitePassword = mpw_siteResult(
masterKey, (char *)siteName, siteCounter, keyPurpose, (char *)keyContext, resultType, NULL, algorithm );
mpw_free( masterKey, MPMasterKeySize );
mpw_free( &masterKey, MPMasterKeySize );
if (!sitePassword) {
ftl( "Couldn't derive site password.\n" );
continue;
@@ -72,7 +72,7 @@ int main(int argc, char *const argv[]) {
}
// Free test case.
mpw_free_string( sitePassword );
mpw_free_string( &sitePassword );
xmlFree( id );
xmlFree( fullName );
xmlFree( masterPassword );