It is expected DH_free(DH_new()); to leaks memory. Usually XXX method initialize "extra data".
Sample code is without code that clear library, at least CRYPTO_cleanup_all_ex_data is missing. Roumen -- Ticket here: http://rt.openssl.org/Ticket/Display.html?id=2363 Please log in as guest with password guest if prompted -- openssl-dev mailing list To unsubscribe: https://mta.openssl.org/mailman/listinfo/openssl-dev