diff options
author | Adrian Bunk <bunk@stusta.de> | 2006-04-05 22:21:04 -0700 |
---|---|---|
committer | David S. Miller <davem@sunset.davemloft.net> | 2006-04-09 22:25:27 -0700 |
commit | ad96b485b4224785bcca478cfba02d06c46ee575 (patch) | |
tree | 9f5ef069ffef7e02e37d771c23444b6b73d1a6f1 /drivers/net/tg3.c | |
parent | e3a5cd9edff9a7a20de3c88c9d479704da98fb85 (diff) | |
download | op-kernel-dev-ad96b485b4224785bcca478cfba02d06c46ee575.zip op-kernel-dev-ad96b485b4224785bcca478cfba02d06c46ee575.tar.gz |
[TG3]: Fix a memory leak.
This patch fixes a memory leak (buf wasn't freed) spotted by the
Coverity checker.
Signed-off-by: Adrian Bunk <bunk@stusta.de>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/tg3.c')
-rw-r--r-- | drivers/net/tg3.c | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/drivers/net/tg3.c b/drivers/net/tg3.c index 0b53580..d6047bd 100644 --- a/drivers/net/tg3.c +++ b/drivers/net/tg3.c @@ -8034,9 +8034,13 @@ static int tg3_test_nvram(struct tg3 *tp) for (i = 0; i < size; i++) csum8 += buf8[i]; - if (csum8 == 0) - return 0; - return -EIO; + if (csum8 == 0) { + err = 0; + goto out; + } + + err = -EIO; + goto out; } /* Bootstrap checksum at offset 0x10 */ |