Skip to content

Commit

Permalink
[media] frontends/ix2505v: Remember to free allocated memory in failu…
Browse files Browse the repository at this point in the history
…re 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>
  • Loading branch information
Jesper Juhl authored and Mauro Carvalho Chehab committed Jan 19, 2011
1 parent a63d601 commit 36fd978
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/media/dvb/frontends/ix2505v.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 36fd978

Please sign in to comment.