d164404 LDAP: Do not clobber return value when multiple controls are returned

Authored and Committed by jhrozek 9 years ago
    LDAP: Do not clobber return value when multiple controls are returned
    
    We loop over the array of returned controls and set 'ret' based on the
    control value. In case multiple controls were returned, the 'ret'
    variable might be clobbered with result of a string-to-int conversion.
    
    Reviewed-by: Pavel Reichl <preichl@redhat.com>
    (cherry picked from commit 6a3ec7ba6f99b027c4c15a360ef0116fe60a0705)