提交 1ad9bdf2 编写于 作者: R Richard Levitte

Use MemCheck_start() instead of CRYPTO_mem_ctrl(), and generate a small leak to test (conditional)

上级 8a158009
...@@ -136,7 +136,7 @@ int main(int Argc, char *Argv[]) ...@@ -136,7 +136,7 @@ int main(int Argc, char *Argv[])
if ((bio_err=BIO_new(BIO_s_file())) != NULL) if ((bio_err=BIO_new(BIO_s_file())) != NULL)
BIO_set_fp(bio_err,stderr,BIO_NOCLOSE|BIO_FP_TEXT); BIO_set_fp(bio_err,stderr,BIO_NOCLOSE|BIO_FP_TEXT);
CRYPTO_mem_ctrl(CRYPTO_MEM_CHECK_ON); MemCheck_start()
ERR_load_crypto_strings(); ERR_load_crypto_strings();
...@@ -236,6 +236,13 @@ end: ...@@ -236,6 +236,13 @@ end:
EVP_cleanup(); EVP_cleanup();
ERR_free_strings(); ERR_free_strings();
#ifdef LEVITTE_DEBUG
{
/* Just to make sure I get a memory leak I can see :-) */
char *p = Malloc(1024);
}
#endif
CRYPTO_mem_leaks(bio_err); CRYPTO_mem_leaks(bio_err);
if (bio_err != NULL) if (bio_err != NULL)
{ {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册