Oh, one more thing. This is a very common type of error. It's very hard to test all possible out-of-memory paths. Worse, leaks in the error paths is common (your submitted fix even had one) making it hard to recover from an out-of-memory condition.
If you are trying to code reliable applications, you should not let your primary memory allocator return NULL. If you are running low on memory, begin load shedding and take other techniques to reduce load and memory usage. If those techniques fail, then your application has failed. It's just dangerous to hope that all your code, and the code you calls, correctly handles all the places where an allocator might return NULL. Using allocators that never return NULL (blocking until memory can be made available, dropping caches, and so on) is much, MUCH more robust. Not that known bugs shouldn't be fixed, of course. DS ______________________________________________________________________ OpenSSL Project http://www.openssl.org Development Mailing List openssl-dev@openssl.org Automated List Manager majord...@openssl.org