[Bug 542798] New: acpica-20090320-2.19: resource leak
http://bugzilla.novell.com/show_bug.cgi?id=542798 Summary: acpica-20090320-2.19: resource leak 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 acpica-20090320-2.19, source code file acpica-unix-20090320/tools/acpixtract/acpixtract.c, function ExtractTables. I notice the following code InputFile = fopen (InputPathname, "rt"); but later is if (Instances < MinimumInstances) { printf ("Table %s was not found in %s\n", Signature, InputPathname); return -1; } if (Instances == 0) { return 0; } If either of these returns are taken, then the file is left open. This looks like a resource leak to me. Suggest fclose the file for both returns. -- 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=542798 Marcus Meissner <meissner@novell.com> changed: What |Removed |Added ---------------------------------------------------------------------------- AssignedTo|bnc-team-screening@forge.pr |trenn@novell.com |ovo.novell.com | -- 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=542798 User trenn@novell.com added comment http://bugzilla.novell.com/show_bug.cgi?id=542798#c1 Thomas Renninger <trenn@novell.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |Robert.Moore@intel.com --- Comment #1 from Thomas Renninger <trenn@novell.com> 2009-10-02 07:13:33 MDT --- acpica has it's own bugzilla: http://acpica.org/bugzilla/ Better report acpica related things, especially against factory there. Bob: Could you fix this upstream if you think it's appropriate, sounds like a reasonable and easy cleanup. -- 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=542798 User Robert.Moore@intel.com added comment http://bugzilla.novell.com/show_bug.cgi?id=542798#c2 --- Comment #2 from Robert Moore <Robert.Moore@intel.com> 2009-10-02 08:39:19 MDT --- As a systems programmer, I always wonder about the philosophy of this in application code. Given that the program is about to abort, and the host will be cleaning up afterwards, does it really matter if some resources are unreleased? I'll do this, but just wondering. -- 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=542798 User trenn@novell.com added comment http://bugzilla.novell.com/show_bug.cgi?id=542798#c3 Thomas Renninger <trenn@novell.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED Resolution| |FIXED --- Comment #3 from Thomas Renninger <trenn@novell.com> 2009-10-02 08:50:04 MDT --- Ditto.
does it really matter if some resources are unreleased? No. It looks somewhat nicer. But it's great that people go through the code and invest time to report such (sometimes more relevant) issues.
I close this one, added or not..., thanks everybody. -- 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=542798 User Robert.Moore@intel.com added comment http://bugzilla.novell.com/show_bug.cgi?id=542798#c4 --- Comment #4 from Robert Moore <Robert.Moore@intel.com> 2009-10-02 09:02:54 MDT --- Yes, of course we do appreciate people looking at the code carefully. Thanks. I suppose that an argument could be made that the code could be re-arranged in some way in the future such that a resource leak might become a major problem. Therefore, it would be best to always release all resources. -- 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.
participants (1)
-
bugzilla_noreply@novell.com