A fair amount of openssl code is written this way:
type v1 = NULL;
type v2 = NULL;
...do stuff...
if (error) goto escape:
normal return
escape:
if (v1) v1_free(v1);
if (v2) v2_free(v2);
...
Sometimes there's only v1, and sometimes there's up to v3,v4,v5...
I think keeping the common construction is more important than the
"needless" double-test.
/r$
--
Visiting Member, IBM Academy
STSM, DataPower Chief Programmer
WebSphere DataPower SOA Appliances
http://www.ibm.com/software/integration/datapower/
______________________________________________________________________
OpenSSL Project http://www.openssl.org
Development Mailing List [email protected]
Automated List Manager [email protected]