[Bug 530391] New: sendmail-8.14.3-50.65: missing call to close
http://bugzilla.novell.com/show_bug.cgi?id=530391 Summary: sendmail-8.14.3-50.65: 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 sendmail-8.14.3-50.65 For source code file sendmail-8.14.3/sendmail/queue.c around line 560 is the source code for the function queueup. I notice the following line of code dfd = open(df, O_WRONLY|O_CREAT|O_TRUNC|QF_O_EXTRA, QueueFileMode); but I fail to notice a matching call to close. This looks like a resource leak to me. Suggest add call to close. -- Configure bugmail: http://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
http://bugzilla.novell.com/show_bug.cgi?id=530391
Marcus Meissner
http://bugzilla.novell.com/show_bug.cgi?id=530391
User werner@novell.com added comment
http://bugzilla.novell.com/show_bug.cgi?id=530391#c1
Dr. Werner Fink
http://bugzilla.novell.com/show_bug.cgi?id=530391
User dcb314@hotmail.com added comment
http://bugzilla.novell.com/show_bug.cgi?id=530391#c2
David Binderman
Sorry this *will* be closed within sm_io_close() around line 597.
I don't see this. I can see a call to open, I can see that sm_io_open gets given the value of dfd as a void * pointer, but crucially it doesn't remember it for later use by any close function, and then I can see a call to fstat. I still see no call to close. -- Configure bugmail: http://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
http://bugzilla.novell.com/show_bug.cgi?id=530391
User werner@novell.com added comment
http://bugzilla.novell.com/show_bug.cgi?id=530391#c3
Dr. Werner Fink
http://bugzilla.novell.com/show_bug.cgi?id=530391
User dcb314@hotmail.com added comment
http://bugzilla.novell.com/show_bug.cgi?id=530391#c4
David Binderman
Why do you not belive me?
Primarily because your explanation wasn't plausible. I am happy for you to find the fault in the explanation I provide. Or looking at the problem in a different way, how does the discarded value of the file descriptor get re-created somewhere else ?
Please use a debugger to test it out.
Valgrind would be a possible other way to do it.
It will be closed.
I wouldn't regard "It's a bit tricky" as enough proof that I'm wrong. Some more detail would be preferred, if you could be so helpful. And if it is tricky and beyond my comprehension, would it be worth documenting ? -- Configure bugmail: http://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
http://bugzilla.novell.com/show_bug.cgi?id=530391
User werner@novell.com added comment
http://bugzilla.novell.com/show_bug.cgi?id=530391#c5
Dr. Werner Fink
participants (1)
-
bugzilla_noreply@novell.com