fixed keyring-related memory leaks

This commit is contained in:
Dan Staples 2013-10-31 21:42:37 -04:00 committed by Jeremy Lakeman
parent b3ad074666
commit f1d817463e

View File

@ -223,6 +223,7 @@ void keyring_free(keyring_file *k)
/* Wipe everything, just to be sure. */
bzero(k,sizeof(keyring_file));
free(k);
return;
}
@ -272,6 +273,7 @@ static void keyring_free_context(keyring_context *c)
}
if (c->KeyRingSalt) {
bzero(c->KeyRingSalt,c->KeyRingSaltLen);
free(c->KeyRingSalt);
c->KeyRingSalt = NULL;
c->KeyRingSaltLen = 0;
}