aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDan Carpenter <error27@gmail.com>2011-01-19 09:27:58 -0500
committerMauro Carvalho Chehab <mchehab@redhat.com>2011-03-21 19:32:39 -0400
commited54c0e33c6ac72c681f00a41b47840f6570262c (patch)
treee01236b29898dc6657c8a5078eb7795732cac759
parent40285f832b09feb621d8da9db7983200a4b29311 (diff)
[media] dib8000: fix small memory leak on error
kfree(state) if fe allocation fails. Signed-off-by: Dan Carpenter <error27@gmail.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
-rw-r--r--drivers/media/dvb/frontends/dib8000.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/media/dvb/frontends/dib8000.c b/drivers/media/dvb/frontends/dib8000.c
index 3e20aa8db23b..c1c3e26906e2 100644
--- a/drivers/media/dvb/frontends/dib8000.c
+++ b/drivers/media/dvb/frontends/dib8000.c
@@ -2514,7 +2514,7 @@ struct dvb_frontend *dib8000_attach(struct i2c_adapter *i2c_adap, u8 i2c_addr, s
2514 return NULL; 2514 return NULL;
2515 fe = kzalloc(sizeof(struct dvb_frontend), GFP_KERNEL); 2515 fe = kzalloc(sizeof(struct dvb_frontend), GFP_KERNEL);
2516 if (fe == NULL) 2516 if (fe == NULL)
2517 return NULL; 2517 goto error;
2518 2518
2519 memcpy(&state->cfg, cfg, sizeof(struct dib8000_config)); 2519 memcpy(&state->cfg, cfg, sizeof(struct dib8000_config));
2520 state->i2c.adap = i2c_adap; 2520 state->i2c.adap = i2c_adap;