aboutsummaryrefslogtreecommitdiffstats
path: root/crypto/rsa/rsa_saos.c
diff options
context:
space:
mode:
authorDr. Stephen Henson <steve@openssl.org>2004-12-05 01:03:15 +0000
committerDr. Stephen Henson <steve@openssl.org>2004-12-05 01:03:15 +0000
commita0e7c8eede26b29b09057f48b8e51f46f8811ddd (patch)
tree2b50575b4e9e608b61cb74246915625bd99b85d8 /crypto/rsa/rsa_saos.c
parenta8e00b17ce840c58787e45411fa2ac4d6b1fb10c (diff)
downloadopenssl-a0e7c8eede26b29b09057f48b8e51f46f8811ddd.tar.gz
Add lots of checks for memory allocation failure, error codes to indicate
failure and freeing up memory if a failure occurs. PR:620
Diffstat (limited to 'crypto/rsa/rsa_saos.c')
-rw-r--r--crypto/rsa/rsa_saos.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/crypto/rsa/rsa_saos.c b/crypto/rsa/rsa_saos.c
index 1e9339367f..f98e0a80a6 100644
--- a/crypto/rsa/rsa_saos.c
+++ b/crypto/rsa/rsa_saos.c
@@ -140,8 +140,11 @@ int RSA_verify_ASN1_OCTET_STRING(int dtype,
ret=1;
err:
if (sig != NULL) M_ASN1_OCTET_STRING_free(sig);
- OPENSSL_cleanse(s,(unsigned int)siglen);
- OPENSSL_free(s);
+ if (s != NULL)
+ {
+ OPENSSL_cleanse(s,(unsigned int)siglen);
+ OPENSSL_free(s);
+ }
return(ret);
}