[Bug 546035] New: blktrace-1.0.1-3.21: memory leak in useless code
http://bugzilla.novell.com/show_bug.cgi?id=546035 Summary: blktrace-1.0.1-3.21: memory leak in useless code 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-3.21 source code file blktrace-1.0.1/btreplay/btreplay.c function find_input_devs local variable is dsf I notice the following code while ((ent = readdir(dir)) != NULL) { char *p, *dsf = malloc(256); if (strstr(ent->d_name, ".replay.") == NULL) continue; dsf = strdup(ent->d_name); so the call to malloc at the declaration of dsf is a memory leak and useless code. Suggest new code while ((ent = readdir(dir)) != NULL) { char *p, *dsf; if (strstr(ent->d_name, ".replay.") == NULL) continue; dsf = strdup(ent->d_name); -- 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=546035 Andreas Jaeger <aj@novell.com> changed: What |Removed |Added ---------------------------------------------------------------------------- AssignedTo|bnc-team-screening@forge.pr |jblunck@novell.com |ovo.novell.com | Summary|blktrace-1.0.1-3.21: memory |JJ: blktrace-1.0.1-3.21: |leak in useless code |memory leak in useless code -- 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=546035 User marek.belisko@open-nandra.com added comment http://bugzilla.novell.com/show_bug.cgi?id=546035#c1 Marek Belisko <marek.belisko@open-nandra.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |marek.belisko@open-nandra.c | |om --- Comment #1 from Marek Belisko <marek.belisko@open-nandra.com> 2009-10-15 14:10:56 MDT --- Fixed sent to the project as sr#22472. -- 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=546035 User rguenther@novell.com added comment http://bugzilla.novell.com/show_bug.cgi?id=546035#c2 --- Comment #2 from Richard Guenther <rguenther@novell.com> 2009-10-17 08:56:21 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. -- 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=546035 User jack@novell.com added comment http://bugzilla.novell.com/show_bug.cgi?id=546035#c3 Jan Kara <jack@novell.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |NEEDINFO CC| |jack@novell.com Info Provider| |marek.belisko@open-nandra.c | |om --- Comment #3 from Jan Kara <jack@novell.com> 2009-10-19 00:18:55 MDT --- I've just checked and the bug seems to be in the upstream version of blktrace as well. So Marek, could you please submit the fix directly to Jens Axboe <axboe@kernel.dk>? We'll then get the fix from him after updating to newest version. Thanks a lot for the fix. -- 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=546035 http://bugzilla.novell.com/show_bug.cgi?id=546035#c4 Jan Blunck <jblunck@novell.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEEDINFO |RESOLVED InfoProvider|marek.belisko@open-nandra.c | |om | Resolution| |UPSTREAM --- Comment #4 from Jan Blunck <jblunck@novell.com> 2010-07-20 08:31:03 UTC --- Patch is in openSUSE:Factory and submitted to blktrace mailing list. -- 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=546035 http://bugzilla.novell.com/show_bug.cgi?id=546035#c5 --- Comment #5 from Bernhard Wiedemann <bwiedemann@suse.com> --- This is an autogenerated message for OBS integration: This bug (546035) was mentioned in https://build.opensuse.org/request/show/23220 Factory / blktrace -- You are receiving this mail because: You are on the CC list for the bug.
participants (1)
-
bugzilla_noreply@novell.com