Ticket #161 - Review and address latest Coverity issues
https://fedorahosted.org/389/ticket/161
Resolves: Ticket #161
Bug Description: Review and address latest Coverity issues
Reviewed by: nhosoi (Thanks!)
Branch: master
Fix Description:
12456-12455 Time of check time of use
get rid of unused code
12454 Time of check time of use In change_uid()
open file first using open() and perform other operations using the fd
12452 Format string vulnerability
get rid of unused code
12448 Time of check time of use
get rid of unused code
11147-11146 Missing varargs init or cleanup
be sure to call va_end() to cleanup
11145 Resource leak In cgid_server()
close(sd) before leaving function
11144-11142 Resource leak
get rid of unused code
11141 Resource leak In list_directory():
free ar
11140 Resource leak
get rid of unused code
11121 Missing break in switch
get rid of unused code
Platforms tested: RHEL6 x86_64
Flag Day: no
Doc impact: no