* [patch 1/2] [media] dib8000: fix small memory leak on error
@ 2011-01-19 14:27 Dan Carpenter
0 siblings, 0 replies; only message in thread
From: Dan Carpenter @ 2011-01-19 14:27 UTC (permalink / raw)
To: Mauro Carvalho Chehab
Cc: Patrick Boettcher, Olivier Grenie, linux-media, kernel-janitors
kfree(state) if fe allocation fails.
Signed-off-by: Dan Carpenter <error27@gmail.com>
diff --git a/drivers/media/dvb/frontends/dib8000.c b/drivers/media/dvb/frontends/dib8000.c
index 3e20aa8..c1c3e26 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
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;
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2011-01-19 14:28 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-01-19 14:27 [patch 1/2] [media] dib8000: fix small memory leak on error Dan Carpenter
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox