• Jimmy Brisson's avatar
    Free X509_EXTENSIONs · bea80198
    Jimmy Brisson authored
    
    
    Previously, we would leak these extensions as they are not freed by the
    stack. An except from the `sk_TYPE_free` documentation:
    
        sk_TYPE_free() frees up the sk structure. It does not free up any
        elements of sk. After this call sk is no longer valid.
    
    The fix is to drain the stack and free its elements before freeing the
    stack. sk_TYPE_pop_free does this, so we use that instead.
    
    Change-Id: Ie70c302f9dda5af1a7243f163d36e99916ee639c
    Signed-off-by: default avatarJimmy Brisson <jimmy.brisson@arm.com>
    bea80198
main.c 13 KB