projects
/
GitHub
/
LineageOS
/
G12
/
android_kernel_amlogic_linux-4.9.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
b5680e0
)
hamradio: Resolve memory leak due to missing firmware release in add_mcs()
author
Jesper Juhl
<jj@chaosbits.net>
Thu, 6 Jan 2011 10:50:29 +0000
(10:50 +0000)
committer
David S. Miller
<davem@davemloft.net>
Sun, 9 Jan 2011 23:45:48 +0000
(15:45 -0800)
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>
drivers/net/hamradio/yam.c
patch
|
blob
|
blame
|
history
diff --git
a/drivers/net/hamradio/yam.c
b/drivers/net/hamradio/yam.c
index 4e7d1d0a23401d3d3601ac671d5ba1d60aac7399..7d9ced0738c545e47cd3c5af8495f6544ade1e8d 100644
(file)
--- 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;
}