提交 26877c79 编写于 作者: J Jesper Juhl 提交者: David S. Miller

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: NJesper Juhl <jj@chaosbits.net>
Signed-off-by: NDavid S. Miller <davem@davemloft.net>
上级 b5680e0b
......@@ -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;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册