diff options
author | Pauli <paul.dale@oracle.com> | 2018-11-16 11:44:30 +1000 |
---|---|---|
committer | Pauli <paul.dale@oracle.com> | 2019-02-18 13:28:14 +1000 |
commit | 1bdbdaffdc66be457a40f33640b523aaf21138c6 (patch) | |
tree | 23bd17995698f4f14780fc9b9a3dad589f2ea96a /crypto/lhash/lhash.c | |
parent | e3ac3654892246d7492f1012897e42ad7efd13ce (diff) |
Properties for implementation selection.
Properties are a sequence of comma separated name=value pairs. A name
without a corresponding value is assumed to be a Boolean and have the
true value 'yes'. Values are either strings or numbers. Strings can be
quoted either _"_ or _'_ or unquoted (with restrictions). There are no
escape characters inside strings. Number are either decimal digits or
'0x' followed by hexidecimal digits. Numbers are represented internally
as signed sixty four bit values.
Queries on properties are a sequence comma separated conditional tests.
These take the form of name=value (equality test), name!=value (inequality
test) or name (Boolean test for truth). Queries can be parsed, compared
against a definition or merged pairwise.
Reviewed-by: Matt Caswell <matt@openssl.org>
Reviewed-by: Tim Hudson <tjh@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/8224)
Diffstat (limited to 'crypto/lhash/lhash.c')
-rw-r--r-- | crypto/lhash/lhash.c | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/crypto/lhash/lhash.c b/crypto/lhash/lhash.c index c826039807..aa0ca1c957 100644 --- a/crypto/lhash/lhash.c +++ b/crypto/lhash/lhash.c @@ -75,6 +75,16 @@ err: void OPENSSL_LH_free(OPENSSL_LHASH *lh) { + if (lh == NULL) + return; + + OPENSSL_LH_flush(lh); + OPENSSL_free(lh->b); + OPENSSL_free(lh); +} + +void OPENSSL_LH_flush(OPENSSL_LHASH *lh) +{ unsigned int i; OPENSSL_LH_NODE *n, *nn; @@ -89,8 +99,6 @@ void OPENSSL_LH_free(OPENSSL_LHASH *lh) n = nn; } } - OPENSSL_free(lh->b); - OPENSSL_free(lh); } void *OPENSSL_LH_insert(OPENSSL_LHASH *lh, void *data) |