Created attachment 25423 [details] fix during a check of the current git head of the linux kernel with the static code analysis tool cppcheck (http://sourceforge.net/apps/mediawiki/cppcheck/index.php?title=Main_Page) the tool discovered a memory leak in linux-2.6/drivers/acpi/ec.c Please refer the attached patch, that fixes the issue. Best regards Ettl Martin
There is no memory leak. This was already discussed.
Where was it already discussed?
bugzilla-daemon@bugzilla.kernel.org пишет: > --- Comment #2 from Martin Ettl <ettl.martin@gmx.de> 2010-03-09 14:54:30 --- > Where was it already discussed? On kernel-janitors@vger.kernel.org mail list.
Is it a false positive of cppcheck? If so, i can report it to the developers. Please tell me why this is no memory leak? <!-- --> -------- Original-Nachricht -------- > Datum: Tue, 9 Mar 2010 14:47:29 GMT > Von: bugzilla-daemon@bugzilla.kernel.org > An: ettl.martin@gmx.de > Betreff: [Bug 15490] [cppcheck] found a memory leak in > linux-2.6/drivers/acpi/ec.c > http://bugzilla.kernel.org/show_bug.cgi?id=15490 > > > Alexey Starikovskiy <astarikovskiy@suse.de> changed: > > What |Removed |Added > ---------------------------------------------------------------------------- > Status|NEW |RESOLVED > CC| |astarikovskiy@suse.de > Resolution| |INVALID > > > > > --- Comment #1 from Alexey Starikovskiy <astarikovskiy@suse.de> > 2010-03-09 14:47:27 --- > There is no memory leak. This was already discussed. > > -- > Configure bugmail: http://bugzilla.kernel.org/userprefs.cgi?tab=email > ------- You are receiving this mail because: ------- > You reported the bug.
saved_ec is allocated only if flag EC_FLAGS_VALIDATE_ECDT is set. There is no sense to set this flag and then forbid reading of DSDT with EC_FLAGS_SKIP_DSDT_SCAN.
Ok, i see. Thank you for you explanation.