d4ff844 sss_client: Fix underflow of active_threads

1 file Authored by lslebodn 8 years ago, Committed by jhrozek 8 years ago,
    sss_client: Fix underflow of active_threads
    
    If the memory cache was not initialized and there was a failure in
    initialisation of memory cache context (e.g. memory cache file
    does not exist) then mc_context had to be destroyed to release
    resources.
    
    However the count of active threads in sss_cli_mc_ctx is already higher
    than zero because current thread is working wih the mc_context.
    But this counter was zero-ed with memset in sss_nss_mc_destroy_ctx
    due to issue with initialisation of memory cache.
    Then we have to decrease counter of active thread in function
    sss_nss_mc_get_ctx because initialisation of mc failed.
    And the result of this decrement is underflow of counter.
    
    Related to:
    https://fedorahosted.org/sssd/ticket/2726
    
    Reviewed-by: Michal Židek <mzidek@redhat.com>