You must free the errbuf buffer by calling slapi_ch_free() when you are finished using the error message.