aboutsummaryrefslogtreecommitdiff
path: root/crypto/ec
diff options
context:
space:
mode:
Diffstat (limited to 'crypto/ec')
-rw-r--r--crypto/ec/ec_key.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/crypto/ec/ec_key.c b/crypto/ec/ec_key.c
index 439cfa2..c382e7e 100644
--- a/crypto/ec/ec_key.c
+++ b/crypto/ec/ec_key.c
@@ -583,8 +583,8 @@ size_t EC_KEY_priv2buf(const EC_KEY *eckey, unsigned char **pbuf)
size_t len;
unsigned char *buf;
len = EC_KEY_priv2oct(eckey, NULL, 0);
- if (len == 0 || pbuf == NULL)
- return len;
+ if (len == 0)
+ return 0;
buf = OPENSSL_malloc(len);
if (buf == NULL)
return 0;