Ticket 49675 - Fix coverity issues
Description: Fixed these coverity issues. Some of these fixes are
just to quiet convscan:
16852 Unsigned compared - entrycache_add_int
16848 Unsigned compared - dncache_add_int
16704 Explicit null dereferenced s- lapd_SSL_client_auth
15953 Resource leak - new_task
15583 Out-of-bounds read - create_filter
15445 Unused value - ruv_update_ruv
15442 Argument cannot be negative - dse_write_file_nolock
15223 Double unlock - ruv_get_referrals
15170 Explicit null dereferenced - passwd_apply_mods
15581 Wrong sizeof argument - slapi_be_new
15144 Constant expression result - upgradedn_producer
Also fixed a few compiler warnings
https://pagure.io/389-ds-base/issue/49675
Reviewed by: spichugi & lkrispenz(Thanks!!)