Bug 39102 - p54usb.c memory leak and eeprom.c has unassigned values
Summary: p54usb.c memory leak and eeprom.c has unassigned values
Status: RESOLVED WILL_NOT_FIX
Alias: None
Product: Drivers
Classification: Unclassified
Component: network-wireless (show other bugs)
Hardware: All Linux
: P1 normal
Assignee: drivers_network-wireless@kernel-bugs.osdl.org
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-07-10 03:24 UTC by DJ Cozatt
Modified: 2012-08-24 15:20 UTC (History)
4 users (show)

See Also:
Kernel Version: 2.6.39
Subsystem:
Regression: No
Bisected commit-id:


Attachments

Description DJ Cozatt 2011-07-10 03:24:32 UTC
david@random /usr/src/linux/drivers/net/wireless/p54 $ cppcheck . -f --enable=all 2> /home/david/p54-errors.txt

david@random /usr/src/linux/drivers/net/wireless/p54 $ cppcheck --version
Cppcheck 1.48

Linux random 2.6.39-gentoo-r2 #3 SMP Wed Jul 6 15:21:54 EDT 2011 x86_64 Intel(R) Pentium(R) 4 CPU 2.80GHz GenuineIntel GNU/Linux

Not sure the unassigned values might not be a false positive but reporting anyway.

[eeprom.c:398]: (style) Variable 'dst' is not assigned a value
[eeprom.c:399]: (style) Variable 'src' is not assigned a value
[p54usb.c:367]: (error) Memory leak: reg
Comment 1 Christian Lamparter 2011-07-11 18:26:52 UTC
dst and src are used by sizeof to save some "excessive"
sizeof(struct p54_abcdefg). if you want to can post a patch
which replace both aliases.

the p54usb.c "error" looks like a false-positive. In fact there's a
note in p54usb.c at line 333 which tells you why it should not leak.

Regards,
    Chr

Note You need to log in before you can comment on or make changes to this bug.