summaryrefslogtreecommitdiffstats
path: root/crypto/txt_db
diff options
context:
space:
mode:
authorRich Salz <rsalz@openssl.org>2018-03-27 22:25:08 +0200
committerRich Salz <rsalz@openssl.org>2018-03-27 22:25:08 +0200
commite6e9170d6e28038768895e1af18e3aad8093bf4b (patch)
tree62f594f0968ff8d6c27795377a102e4aab373b00 /crypto/txt_db
parento_time.c: use gmtime_s with MSVC (diff)
downloadopenssl-e6e9170d6e28038768895e1af18e3aad8093bf4b.tar.xz
openssl-e6e9170d6e28038768895e1af18e3aad8093bf4b.zip
Allow NULL for some _free routines.
Based on the description in https://github.com/openssl/openssl/pull/5757, this re-implements the "allow NULL to be passed" behavior of a number of xxx_free routines. I also fixed up some egregious formatting errors that were nearby. Reviewed-by: Richard Levitte <levitte@openssl.org> (Merged from https://github.com/openssl/openssl/pull/5761)
Diffstat (limited to 'crypto/txt_db')
-rw-r--r--crypto/txt_db/txt_db.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/crypto/txt_db/txt_db.c b/crypto/txt_db/txt_db.c
index a08f346af6..a00560dcbd 100644
--- a/crypto/txt_db/txt_db.c
+++ b/crypto/txt_db/txt_db.c
@@ -284,6 +284,8 @@ void TXT_DB_free(TXT_DB *db)
int i, n;
char **p, *max;
+ if (db == NULL)
+ return;
if (db->index != NULL) {
for (i = db->num_fields - 1; i >= 0; i--)
lh_OPENSSL_STRING_free(db->index[i]);