If slapi_valueset_add_value_ext is used with the SLAPI_VALUE_FLAG_DUPCHECK flag, the caller is responsible for knowing how to cleanup the given value if there is an error. For example, if the flags are SLAPI_VALUE_FLAG_DUPCHECK|SLAPI_VALUE_FLAG_PASSIN, slapi_valueset_add_value_ext does not know if it needs to free the given value or not. The caller should be responsible. Right now, no code in 389 uses SLAPI_VALUE_FLAG_DUPCHECK|SLAPI_VALUE_FLAG_PASSIN, but since slapi_valueset_add_value_ext is part of the public SLAPI, someone could use it and cause a memory leak or other problem. https://fedorahosted.org/389/ticket/47506#comment:10 We need to update the plugin guide documenting the return code and the new flag for DUPCHECK
Pushing it to FUTURE.