On Sun, 30 Aug 2015 23:24:07 +0000, Michael McConville wrote:
Mansour Moufid wrote:
Michael McConville wrote:
...
error:
- if (x509) {
- X509_free(x509);
- x509 = NULL;
- }
...
But you did find some places they forgot to assign NULL after free.
For one reason or another, this isn't common practice.
It's not my practise, at least. I would definitely not use the x509=NULL part when the end of the function is nigh (and doesn't do anything with x509), and for me the =NULL is almost an indication that x509 is used somehow lateron.
Also, if there were an x509=obj->x509 previously the correct thing would be an obj->x509=NULL.
Andreas