> Sometimes, the program crashes when doing an SSL_CTX_free; before the > crash, ctx is an invalid pointer, that's why I can get a valid value from > SSL_CTX_get_max_cert_list (ctx), so it's not a double free problem. You mean it's a VALID pointer? We'll need a more detailed backtrace.