Sun Java System Directory Server Enterprise Edition 6.0 Developer's Guide

Memory Concerns

Filters created using slapi_str2filter() must be freed after using this function. Filters extracted from a parameter block using:

slapi_pblock_get( pb, SLAPI_SEARCH_FILTER, &filter );

must not be freed.