Skip to content

Commit

Permalink
[media] dib8000: fix small memory leak on error
Browse files Browse the repository at this point in the history
kfree(state) if fe allocation fails.

Signed-off-by: Dan Carpenter <error27@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
  • Loading branch information
Dan Carpenter authored and Mauro Carvalho Chehab committed Mar 21, 2011
1 parent 40285f8 commit ed54c0e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/media/dvb/frontends/dib8000.c
Original file line number Diff line number Diff line change
Expand Up @@ -2514,7 +2514,7 @@ struct dvb_frontend *dib8000_attach(struct i2c_adapter *i2c_adap, u8 i2c_addr, s
return NULL;
fe = kzalloc(sizeof(struct dvb_frontend), GFP_KERNEL);
if (fe == NULL)
return NULL;
goto error;

memcpy(&state->cfg, cfg, sizeof(struct dib8000_config));
state->i2c.adap = i2c_adap;
Expand Down

0 comments on commit ed54c0e

Please sign in to comment.