When you no longer need to use the string, you should free it from memory by calling the slapi_ch_free_string() function.