projects
/
openssl.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
Allow NULL for some _free routines.
[openssl.git]
/
crypto
/
bn
/
bn_recp.c
diff --git
a/crypto/bn/bn_recp.c
b/crypto/bn/bn_recp.c
index 923a9b33d8f54be0cdc29194d74a44c0663cdccb..8eb500b61a800d992271f40588c5bd0db0cf01da 100644
(file)
--- a/
crypto/bn/bn_recp.c
+++ b/
crypto/bn/bn_recp.c
@@
-32,8
+32,10
@@
BN_RECP_CTX *BN_RECP_CTX_new(void)
void BN_RECP_CTX_free(BN_RECP_CTX *recp)
{
- BN_free(&(recp->N));
- BN_free(&(recp->Nr));
+ if (recp == NULL)
+ return;
+ BN_free(&recp->N);
+ BN_free(&recp->Nr);
if (recp->flags & BN_FLG_MALLOCED)
OPENSSL_free(recp);
}