Re: Order of Cleanup to avoid memory leaks?

2014-02-15 Thread Dr. Stephen Henson
On Mon, Feb 10, 2014, Jeffrey Walton wrote: I'm trying to remediate a couple of memory leaks on shutdown. I'm having trouble: (1) locating a definitive guide that lists what should be called during cleanup; and (2) what order they should be called in. The closest I've find to answering the

Re: Order of Cleanup to avoid memory leaks?

2014-02-14 Thread Jeffrey Walton
Here's the code that's causing the leak. It only happens on a non-existent file. BIO bio = BIO_new_file(does-not-exist, r); // dh = PEM_read_bio_DHparams(bio, NULL, NULL, NULL); I still don't know how to clear it, however. Is there some *_cleanup() I missed? Does order matter? Jeff On Mon,

Order of Cleanup to avoid memory leaks?

2014-02-10 Thread Jeffrey Walton
I'm trying to remediate a couple of memory leaks on shutdown. I'm having trouble: (1) locating a definitive guide that lists what should be called during cleanup; and (2) what order they should be called in. The closest I've find to answering the questions are (1) OpenSSL source code; and (2)