3adc242 Ticket #47455 - valgrind - value mem leaks, uninit mem usage

Authored and Committed by rmeggins 8 years ago
    Ticket #47455 - valgrind - value mem leaks, uninit mem usage
    
    https://fedorahosted.org/389/ticket/47455
    Reviewed by: nkinder (Thanks!)
    Branch: master
    Fix Description: The problem was that slapi_valueset_add_attr_valuearray_ext
    was assuming the caller was going to free the entire given vs upon failure.
    This is fine for the value replace case but not for the add 1 value case.
    Callers of slapi_valueset_add_attr_valuearray_ext must provide
    the dup_index parameter if using SLAPI_VALUE_FLAG_PASSIN and
    SLAPI_VALUE_FLAG_DUPCHECK, and if there is more than one value.  The caller
    needs to know which of the values from addvals is in vs to properly clean up
    with no memory leaks.
    Platforms tested: RHEL6 x86_64
    Flag Day: no
    Doc impact: no