diff options
author | Jesper Juhl <jj@chaosbits.net> | 2011-01-02 14:14:03 -0500 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@redhat.com> | 2011-01-19 08:45:44 -0500 |
commit | 36fd97884daf4e30b556a6c59b58db19a06d58af (patch) | |
tree | 347fff9429e47ee8f8360fe26284e026c285405f /drivers/media | |
parent | a63d601803c2e3ba06ed51b9ed997fc6bf80e5bf (diff) |
[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: Jesper Juhl <jj@chaosbits.net>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/media')
-rw-r--r-- | drivers/media/dvb/frontends/ix2505v.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/media/dvb/frontends/ix2505v.c b/drivers/media/dvb/frontends/ix2505v.c index 6360c681ded9..6c2e929bd79f 100644 --- a/drivers/media/dvb/frontends/ix2505v.c +++ b/drivers/media/dvb/frontends/ix2505v.c | |||
@@ -311,7 +311,7 @@ struct dvb_frontend *ix2505v_attach(struct dvb_frontend *fe, | |||
311 | return fe; | 311 | return fe; |
312 | 312 | ||
313 | error: | 313 | error: |
314 | ix2505v_release(fe); | 314 | kfree(state); |
315 | return NULL; | 315 | return NULL; |
316 | } | 316 | } |
317 | EXPORT_SYMBOL(ix2505v_attach); | 317 | EXPORT_SYMBOL(ix2505v_attach); |