[Bug 544338] New: nasm-2.06rc2-1.56: code in bad order
http://bugzilla.novell.com/show_bug.cgi?id=544338 Summary: nasm-2.06rc2-1.56: code in bad order 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 nasm-2.06rc2-1.56 source code file nasm-2.06rc2/rdoff/rdlib.c function rdl_verify local variable fp. I notice the following code FILE *fp = fopen(filename, "rb"); char buf[257]; int i; int32_t length; static char lastverified[256]; static int lastresult = -1; if (lastresult != -1 && !strcmp(filename, lastverified)) return lastresult; If the return is taken, then the fopen leaves a resource leak. Suggest move call to fopen until after the call to return. FILE *fp; char buf[257]; int i; int32_t length; static char lastverified[256]; static int lastresult = -1; if (lastresult != -1 && !strcmp(filename, lastverified)) return lastresult; fp = fopen(filename, "rb"); -- 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=544338
Marcus Meissner
http://bugzilla.novell.com/show_bug.cgi?id=544338
User rguenther@novell.com added comment
http://bugzilla.novell.com/show_bug.cgi?id=544338#c1
--- Comment #1 from Richard Guenther
http://bugzilla.novell.com/show_bug.cgi?id=544338
User pth@novell.com added comment
http://bugzilla.novell.com/show_bug.cgi?id=544338#c2
Philipp Thomas
participants (1)
-
bugzilla_noreply@novell.com