https://bugzilla.redhat.com/show_bug.cgi?id=676053
https://bugzilla.redhat.com/attachment.cgi?id=479007&action=diff
https://bugzilla.redhat.com/attachment.cgi?id=479007&action=edit
Description: When a search request with VLV and/or SORT control
fails, it did not returning an entry to the entry cache. The
entry has positive refcnt and won't be cleared even by cache_clear.
This patch adds CACHE_RETURN call for the error cases.