diff options
author | Joel Sing <jsing@cvs.openbsd.org> | 2017-05-06 21:25:16 +0000 |
---|---|---|
committer | Joel Sing <jsing@cvs.openbsd.org> | 2017-05-06 21:25:16 +0000 |
commit | f4aff1d22a19f1e5d6acbff71966fa0ce4918a9d (patch) | |
tree | c91d8741d78088cf825d6ff37cb08ebf71ab8192 /lib | |
parent | 0959106dc3ba93966396d2a57bf20f5fd804f8d4 (diff) |
BIO_free_all() and EVP_PKEY_free() can be called with NULL.
Diffstat (limited to 'lib')
-rw-r--r-- | lib/libtls/tls_util.c | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/lib/libtls/tls_util.c b/lib/libtls/tls_util.c index c643b4a9f62..39504940cf6 100644 --- a/lib/libtls/tls_util.c +++ b/lib/libtls/tls_util.c @@ -1,4 +1,4 @@ -/* $OpenBSD: tls_util.c,v 1.6 2017/05/06 20:57:45 jsing Exp $ */ +/* $OpenBSD: tls_util.c,v 1.7 2017/05/06 21:25:15 jsing Exp $ */ /* * Copyright (c) 2014 Joel Sing <jsing@openbsd.org> * Copyright (c) 2015 Reyk Floeter <reyk@openbsd.org> @@ -171,10 +171,8 @@ tls_load_file(const char *name, size_t *len, char *password) free(buf); if (fd != -1) close(fd); - if (bio != NULL) - BIO_free_all(bio); - if (key != NULL) - EVP_PKEY_free(key); + BIO_free_all(bio); + EVP_PKEY_free(key); return (NULL); } |