Add lots of checks for memory allocation failure, error codes to indicate
[openssl.git] / crypto / rsa / rsa_saos.c
index 1e9339367f268a73ad6d64efa5dc4ce416482ac9..f98e0a80a6c20fbee1b97ffdc45e588772c41363 100644 (file)
@@ -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);
        }