Version: svn head (using Devel) OS: Other Installed from: Compiled sources during a check of kdebase sources (current svn-head) with the static code analysis tool cppcheck (http://sourceforge.net/projects/cppcheck/) the tool discovered a resource leak at kdebase/workspace/kcheckpass/kcheckpass.c. Please refer the attached patch that fixes the issue. Best regards Ettl Martin Index: kcheckpass.c =================================================================== --- kcheckpass.c (Revision 1069610) +++ kcheckpass.c (Arbeitskopie) @@ -408,6 +408,7 @@ lk.l_start = lk.l_len = 0; if (fcntl(lfd, F_SETLKW, &lk)) { message("Cannot obtain lock\n"); + close(lfd); return AuthError; }
Created attachment 39540 [details] proper fix
this is a return statement from the main() function. there is absolutely no point in closing the fd manually at this point.