[Bug 523444] New: blktrace-1.0.1-2.8: memory leak found
http://bugzilla.novell.com/show_bug.cgi?id=523444 Summary: blktrace-1.0.1-2.8: memory leak found 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 blktrace-1.0.1-2.8 For source code blktrace-1.0.1/btreplay/btrecord.c, around line 371 is the source code for the function find_input_files. I notice that every time the continue statement is executed, the function leaks 256 bytes. Suggest code rework. Maybe the following would be suitable if (strstr(ent->d_name, ".blktrace.") == NULL) continue; char *p, *dsf = malloc(256); to ensure the call to malloc only happens after the continue. -- 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=523444
Marcus Meissner
http://bugzilla.novell.com/show_bug.cgi?id=523444
Jan Blunck
http://bugzilla.novell.com/show_bug.cgi?id=523444
User jblunck@novell.com added comment
http://bugzilla.novell.com/show_bug.cgi?id=523444#c1
--- Comment #1 from Jan Blunck
http://bugzilla.novell.com/show_bug.cgi?id=523444
User jblunck@novell.com added comment
http://bugzilla.novell.com/show_bug.cgi?id=523444#c2
--- Comment #2 from Jan Blunck
http://bugzilla.novell.com/show_bug.cgi?id=523444
User dcb314@hotmail.com added comment
http://bugzilla.novell.com/show_bug.cgi?id=523444#c3
--- Comment #3 from David Binderman
I'll send it to the blktrace mailing list
Go right ahead. Thanks for looking into this. -- 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=523444
User dcb314@hotmail.com added comment
http://bugzilla.novell.com/show_bug.cgi?id=523444#c4
--- Comment #4 from David Binderman
This patch just removes the unnecessary call to malloc. I'll send it to the blktrace mailing list
I just checked version 1.0.1-3.13 and the bug still exists. Does this patch need to be applied to the Factory version, or is there some other process to get it into Factory ? -- 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=523444
User rguenther@novell.com added comment
http://bugzilla.novell.com/show_bug.cgi?id=523444#c5
--- Comment #5 from Richard Guenther
http://bugzilla.novell.com/show_bug.cgi?id=523444
http://bugzilla.novell.com/show_bug.cgi?id=523444#c6
Jan Blunck
participants (1)
-
bugzilla_noreply@novell.com