<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
</head>
<body text="#000000" bgcolor="#FFFFFF">
On 1/2/2018 19:36, Dave Coombs wrote:<br>
<blockquote type="cite"
cite="mid:9CA5256C-9FB5-4886-8174-345960BC4FB9@carillon.ca">
<blockquote type="cite">
<pre wrap="">The observation is correct, but the conclusion is wrong.
The object is reference counted, and X509_free() is needed
to avoid a leak (when the store is freed along with the
context).
</pre>
</blockquote>
<pre wrap="">
My apologies -- I assumed based on its name that X509_OBJECT_up_ref_count was upping the refcount on the internal X509_OBJECT, which had taken over the X509*, which led to my conclusion that freeing the X509_STORE frees the X509 too. However, you're right, it ups the refcount on the underlying X509, and so the caller *should* free the underlying object when finished with it.
I've now confirmed with a quick test program and valgrind.
Oops,
-Dave</pre>
</blockquote>
Thanks.<br>
<br>
<div class="moz-signature">-- <br>
Karl Denninger<br>
<a href="mailto:karl@denninger.net">karl@denninger.net</a><br>
<i>The Market Ticker</i><br>
<font size="-2"><i>[S/MIME encrypted email preferred]</i></font>
</div>
</body>
</html>