summaryrefslogtreecommitdiff
path: root/crypto/evp/p_lib.c
diff options
context:
space:
mode:
authorJung-uk Kim <jkim@FreeBSD.org>2015-12-03 17:24:16 +0000
committerJung-uk Kim <jkim@FreeBSD.org>2015-12-03 17:24:16 +0000
commit7f3b396bf01ae727af21c432a52afb8e8ff5781b (patch)
tree8b12a96cca9b24a3d486b1a2e2bed6f3d1f3f2e9 /crypto/evp/p_lib.c
parentc07d7b3a386974c338492659291008bed07948e6 (diff)
Diffstat (limited to 'crypto/evp/p_lib.c')
-rw-r--r--crypto/evp/p_lib.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/crypto/evp/p_lib.c b/crypto/evp/p_lib.c
index 2b84dc75ec3a..375f561258b9 100644
--- a/crypto/evp/p_lib.c
+++ b/crypto/evp/p_lib.c
@@ -253,7 +253,7 @@ int EVP_PKEY_set_type_str(EVP_PKEY *pkey, const char *str, int len)
int EVP_PKEY_assign(EVP_PKEY *pkey, int type, void *key)
{
- if (!EVP_PKEY_set_type(pkey, type))
+ if (pkey == NULL || !EVP_PKEY_set_type(pkey, type))
return 0;
pkey->pkey.ptr = key;
return (key != NULL);