提交 36fd9788 编写于 作者: J Jesper Juhl 提交者: Mauro Carvalho Chehab

[media] frontends/ix2505v: Remember to free allocated memory in failure path

We may leak the storage allocated to 'state' in
drivers/media/dvb/frontends/ix2505v.c::ix2505v_attach() on error, as
it is too early to be able to call ix2505v_release().

This patch makes sure we free the allocated memory in the failure case.
Signed-off-by: NJesper Juhl <jj@chaosbits.net>
Signed-off-by: NMauro Carvalho Chehab <mchehab@redhat.com>
上级 a63d6018
......@@ -311,7 +311,7 @@ struct dvb_frontend *ix2505v_attach(struct dvb_frontend *fe,
return fe;
error:
ix2505v_release(fe);
kfree(state);
return NULL;
}
EXPORT_SYMBOL(ix2505v_attach);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册