6357ced Ticket #47455 - valgrind - value mem leaks, uninit mem usage

Authored and Committed by rmeggins 10 years ago
    Ticket #47455 - valgrind - value mem leaks, uninit mem usage
    
    https://fedorahosted.org/389/ticket/47455
    Reviewed by: nkinder (Thanks!)
    Branch: 389-ds-base-1.3.1
    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
    (cherry picked from commit 3adc242bcc8c6d0d05d5d9773f32b4f81afb6e6d)