> 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).

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

-- 
openssl-users mailing list
To unsubscribe: https://mta.openssl.org/mailman/listinfo/openssl-users

Reply via email to