summaryrefslogtreecommitdiffstats
path: root/drivers/net/hamradio
diff options
context:
space:
mode:
authorJesper Juhl <jj@chaosbits.net>2011-01-06 10:50:29 +0000
committerDavid S. Miller <davem@davemloft.net>2011-01-09 15:45:48 -0800
commit26877c794407855f65c056d7914b2e72ae9b93b8 (patch)
treecc8e388d3a841fb089ea0fd3209b453e155a3dc2 /drivers/net/hamradio
parentb5680e0b591f2701c5ba7d5fc8f96b55414073c8 (diff)
downloadop-kernel-dev-26877c794407855f65c056d7914b2e72ae9b93b8.zip
op-kernel-dev-26877c794407855f65c056d7914b2e72ae9b93b8.tar.gz
hamradio: Resolve memory leak due to missing firmware release in add_mcs()
Failure to release_firmware() in drivers/net/hamradio/yam.c::add_mcs() causes memory leak. This patch should fix it. Signed-off-by: Jesper Juhl <jj@chaosbits.net> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/hamradio')
-rw-r--r--drivers/net/hamradio/yam.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/net/hamradio/yam.c b/drivers/net/hamradio/yam.c
index 4e7d1d0..7d9ced0 100644
--- a/drivers/net/hamradio/yam.c
+++ b/drivers/net/hamradio/yam.c
@@ -396,7 +396,7 @@ static unsigned char *add_mcs(unsigned char *bits, int bitrate,
while (p) {
if (p->bitrate == bitrate) {
memcpy(p->bits, bits, YAM_FPGA_SIZE);
- return p->bits;
+ goto out;
}
p = p->next;
}
@@ -411,7 +411,7 @@ static unsigned char *add_mcs(unsigned char *bits, int bitrate,
p->bitrate = bitrate;
p->next = yam_data;
yam_data = p;
-
+ out:
release_firmware(fw);
return p->bits;
}
OpenPOWER on IntegriCloud