I see here that the memset() function is used to clear passwords.
As passwords are sensitive information I would suggest to replace it with memset_s() so that they can't be recovered from memory.
More information on StakeOverflow: https://stackoverflow.com/questions/56565539/memset-s-what-does-the-standard-mean-with-this-piece-of-text