4de37e6 ipa-kdb: do not fetch client principal if it is the same as existing entry

1 file Authored by abbra 10 years ago, Committed by mkosek 10 years ago,
    ipa-kdb: do not fetch client principal if it is the same as existing entry
    
    When client principal is the same as supplied client entry, don't fetch it
    again.
    
    Note that when client principal is not NULL, client entry might be NULL for
    cross-realm case, so we need to make sure to not dereference NULL pointer here.
    
    Also fix reverted condition for case when we didn't find the client principal
    in the database, preventing a memory leak.
    
    https://fedorahosted.org/freeipa/ticket/4223
    
    Reviewed-By: Sumit Bose <sbose@redhat.com>