title: Openssl RSA_new() and memory leaks detection
body: <p>I don't know why I get memory leak in first test case (for sure it is false positive) but in the identical second test there is no leak detected.</p>
  
  <p>I suspect that openssl frees memory later, not when RSA_free is invoked, at least with rsa structure.</p>
  
  <pre><code>TEST(TestCaseName, test1) {
      _CrtMemState state1;
      _CrtMemCheckpoint(&amp;state1);
  
      auto rsa=RSA_new();
  
      RSA_free(rsa);
  
      _CrtMemState state2;
      _CrtMemCheckpoint(&amp;state2);
      _CrtMemState state3;
      if (_CrtMemDifference(&amp;state3, &amp;state1, &amp;state2))//memory leak detected
          _CrtMemDumpStatistics(&amp;state3);
  }
  
  TEST(TestCaseName, test2) {
      _CrtMemState state1;
      _CrtMemCheckpoint(&amp;state1);
  
      auto rsa = RSA_new();
  
      RSA_free(rsa);
  
      _CrtMemState state2;
      _CrtMemCheckpoint(&amp;state2);
      _CrtMemState state3;
      if (_CrtMemDifference(&amp;state3, &amp;state1, &amp;state2))//ok no leak
          _CrtMemDumpStatistics(&amp;state3);
  }
  </code></pre>
  
  <p>the output of _CrtMemDumpStatistics from the first test is below:</p>
  
  <pre><code>0 bytes in 0 Free Blocks.
  48 bytes in 2 Normal Blocks.
  0 bytes in 0 CRT Blocks.
  0 bytes in 0 Ignore Blocks.
  0 bytes in 0 Client Blocks.
  Largest number used: 0 bytes.
  Total allocations: 168 bytes.
  </code></pre>
  
  <p>there is no output from the second test.
  Does any one know why memory leak is detected in first test but every thing is ok in the second test?</p>