http://bugzilla.novell.com/show_bug.cgi?id=529135
Summary: openvas-client-2.0.1-1.33: missing call to close Classification: openSUSE Product: openSUSE 11.2 Version: Factory Platform: All OS/Version: openSUSE 11.1 Status: NEW Severity: Normal Priority: P5 - None Component: Other AssignedTo: bnc-team-screening@forge.provo.novell.com ReportedBy: dcb314@hotmail.com QAContact: qa@suse.de Found By: ---
I just had a look at factory package openvas-client-2.0.1-1.33
For source code file openvas-client-2.0.1/nessus/comm.c around line 870 is the source code for the function comm_send_file.
I notice the following line of code
fd = open(fname, O_RDONLY);
but I notice that close is only called on failure. Suggest add a call to close at the end of the routine, for the return success case. Like
network_gets(context->socket, buff, sizeof(buff) - 1); fclose( fd); return 0;
http://bugzilla.novell.com/show_bug.cgi?id=529135
Marcus Meissner meissner@novell.com changed:
What |Removed |Added ---------------------------------------------------------------------------- AssignedTo|bnc-team-screening@forge.pr |nadvornik@novell.com |ovo.novell.com |
http://bugzilla.novell.com/show_bug.cgi?id=529135
User rguenther@novell.com added comment http://bugzilla.novell.com/show_bug.cgi?id=529135#c1
--- Comment #1 from Richard Guenther rguenther@novell.com 2009-10-17 08:54:55 MDT --- David, in case the issues are not introduced by a patch local to openSUSE please report the issues upstream.
Packagers, please do not add openSUSE-local patches to fix this kind of errors but forward the bugs upstream and close the bugs as RESOLVED UPSTREAM.
Note that it is perfectly fine to have "resource leaks" at the end of a program as the kernel will clean up for you. Manually freeing them only increases binary size and runtime.
http://bugzilla.novell.com/show_bug.cgi?id=529135 http://bugzilla.novell.com/show_bug.cgi?id=529135#c2
Vladimir Nadvornik nadvornik@suse.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED Resolution|--- |WONTFIX
--- Comment #2 from Vladimir Nadvornik nadvornik@suse.com --- wontfix