On Wed, May 22, 2013, Phillip Hellewell wrote:

> Looking at the implementation of CMS_get0_signers(), it looks like it
> creates a new stack of X509 that I will have to free.
> 
> Isn't the convention to use a "1" if the return values needs to be freed,
> and "0" if not?  So shouldn't this function be named CMS_get1_signers()?
> (Note that CMS_get1_crls() is correctly named with a "1".)
> 
> Probably too late to change it now though, huh?
> 

It's midway between 1 and 0 ;-)

The STACK needs to be freed buty not each individual member. So you call
sk_X509_free and NOT sk_X509_pop_free().

Steve.
--
Dr Stephen N. Henson. OpenSSL project core developer.
Commercial tech support now available see: http://www.openssl.org
______________________________________________________________________
OpenSSL Project                                 http://www.openssl.org
User Support Mailing List                    openssl-users@openssl.org
Automated List Manager                           majord...@openssl.org

Reply via email to