Hello, > StartupThreads are getting a incomming connection, create a > SSL_new(ctx), create a BIO_new(BIO_s_socket()), BIO_set_fd, and > SSL_set_bio. Then they SSL_accept(ssl), and SSL_read what is comming > in. > > So far so good. > > When the input is something this httpsd should react to, i put a > "user" class in an array, with bio, ssl and socket as class variables. > To pass them on to a "worker" thread, which loops over this array and > SSL_writes to the ssl. (once every second) > > When SSL_write < 1, the socket gets closed and gets set to -1 and the > destructor for that user gets called by cleanup thread. > This is what is in there : > if(bio) BIO_ssl_shutdown(bio); > if(ssl){ > ERR_clear_error(); //added and removed these, no difference > ERR_remove_state(0); //idem > SSL_shutdown(ssl); > SSL_free(ssl); > } > > So what is the problem here : It works fine, it just leaves a lot of > used memory behind (memory leak ?) I'm not sure, but maybe you should call ERR_remove_state(0) last (after SSL_free()) because error stack is allocated automatically and after this SSL_* calls you may allocate this stack again.
Best regards, -- Marek Marcola <[EMAIL PROTECTED]> ______________________________________________________________________ OpenSSL Project http://www.openssl.org User Support Mailing List openssl-users@openssl.org Automated List Manager [EMAIL PROTECTED]