openSSL and key encryption password

I was looking for something in pyOpenSSL here:, when I found out OpenSSL saves user cert in immutable _passphrase_userdata variable. Isn’t it kind of dangerous to store such a credential like that?

Since I’d like to repeatedly decrypt private key, set_passwd_cb callback is handful, but I don’t know if I am ok with saving credential to memory forever.