[Openchrome-devel] [Bug 72088] cppcheck report

bugzilla-daemon at freedesktop.org bugzilla-daemon at freedesktop.org
Sun Dec 15 15:06:12 PST 2013


https://bugs.freedesktop.org/show_bug.cgi?id=72088

--- Comment #3 from Mario Rugiero <mrugiero at gmail.com> ---
Just ran cppcheck again.

I will explain the errors I'll fix here, and then provide the patch.

First, this one:

[src/via_driver.c:1109]: (error) Memory pointed to by 'pEnt' is freed twice.

This error is caused because the memory is always freed in line 1031, and all
subsequent calls to this are for freeing in the case of errors. This calls will
be plainly erased, as not only they aren't checked against it having been freed
before (it is, independently of the path, as it is checked only against null
and in the first level of indentation, so I assume it is not inside another
check), but actually it is already freed always, and not needed anymore.

Then, this:
[src/via_exa.c:799] -> [src/via_exa.c:808]: (performance) Variable
'nPOTSupported' is reassigned a value before the old one has been used.

This one is pretty much trivial, and the fix could be safely ommited. I provide
it, anyway, so someone else makes the choice.

There are also, pretty thorough to see, fixes in the registers tool, related
all to formatting on printf.

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/openchrome-devel/attachments/20131215/157adab7/attachment.html>


More information about the Openchrome-devel mailing list