Remove unnecessary memset() to 0 and check for NULL before OPENSSL_free()