59f0107 ipapython: Correct return type of krb5_free_cred_contents

1 file Authored by slev 5 months ago, Committed by frenaud 5 months ago,
    ipapython: Correct return type of krb5_free_cred_contents
    
    According to https://web.mit.edu/kerberos/krb5-latest/doc/appdev/refs/api/krb5_free_cred_contents.html
    
    > krb5_free_cred_contents - Free the contents of a krb5_creds structure.
    >
    > void krb5_free_cred_contents(krb5_context context, krb5_creds * val)
    > param:
    > [in] context - Library context
    >
    > [in] val - Credential structure to free contents of
    >
    > This function frees the contents of val , but not the structure itself.
    
    https://github.com/krb5/krb5/blob/5b00197227231943bd2305328c8260dd0b0dbcf0/src/lib/krb5/krb/kfree.c#L166
    
    This leads to undefined behavior and `krb5_free_cred_contents` can
    raise KRB5Error (because of garbage data) while actually its foreign
    function doesn't.
    
    Fixes: https://pagure.io/freeipa/issue/9519
    Signed-off-by: Stanislav Levin <slev@altlinux.org>
    Reviewed-By: Alexander Bokovoy <abokovoy@redhat.com>
    
        
file modified
+1 -2