diff options
author | Michael Hunold <devnull@localhost> | 2004-06-22 13:42:48 +0000 |
---|---|---|
committer | Michael Hunold <devnull@localhost> | 2004-06-22 13:42:48 +0000 |
commit | 0cc01319857fa9e0ddeefc3be2ed9839d510c1c4 (patch) | |
tree | d500d92a80aa82fe4db2b64ba24fb1220f9567f6 /linux/drivers | |
parent | f4a94062511dd119d6ae332cf5967f9eb1316ae1 (diff) | |
download | mediapointer-dvb-s2-0cc01319857fa9e0ddeefc3be2ed9839d510c1c4.tar.gz mediapointer-dvb-s2-0cc01319857fa9e0ddeefc3be2ed9839d510c1c4.tar.bz2 |
- don't leak memory, thanks to Kenneth Aafløy
Diffstat (limited to 'linux/drivers')
-rw-r--r-- | linux/drivers/media/dvb/frontends/stv0299.c | 5 | ||||
-rw-r--r-- | linux/drivers/media/dvb/frontends/ves1x93.c | 7 |
2 files changed, 7 insertions, 5 deletions
diff --git a/linux/drivers/media/dvb/frontends/stv0299.c b/linux/drivers/media/dvb/frontends/stv0299.c index 17d6a6035..cd63d9b7d 100644 --- a/linux/drivers/media/dvb/frontends/stv0299.c +++ b/linux/drivers/media/dvb/frontends/stv0299.c @@ -1388,20 +1388,21 @@ static int attach_adapter(struct i2c_adapter *adapter) static int detach_client(struct i2c_client *client) { + struct stv0299_data *data = (struct stv0299_data*)i2c_get_clientdata(client); i2c_detach_client(client); kfree(client); + kfree(data); return 0; } static int command (struct i2c_client *client, unsigned int cmd, void *arg) { - struct stv0299_data *data = (struct stv0299_data*)i2c_get_clientdata(client); - dprintk ("%s\n", __FUNCTION__); switch (cmd) { case FE_REGISTER: { struct dvb_adapter *dvb_adapter = (struct dvb_adapter*)arg; + struct stv0299_data *data = (struct stv0299_data*)i2c_get_clientdata(client); return dvb_register_frontend_new (uni0299_ioctl, dvb_adapter, (void*) data, &uni0299_info); } case FE_UNREGISTER: { diff --git a/linux/drivers/media/dvb/frontends/ves1x93.c b/linux/drivers/media/dvb/frontends/ves1x93.c index 75523847b..7b36065a4 100644 --- a/linux/drivers/media/dvb/frontends/ves1x93.c +++ b/linux/drivers/media/dvb/frontends/ves1x93.c @@ -637,20 +637,21 @@ static int attach_adapter(struct i2c_adapter *adapter) static int detach_client(struct i2c_client *client) { + struct ves1x93_state *data = (struct ves1x93_state*)i2c_get_clientdata(client); i2c_detach_client(client); kfree(client); + kfree(state); return 0; } static int command (struct i2c_client *client, unsigned int cmd, void *arg) { - struct stv0299_data *data = (struct stv0299_data*)i2c_get_clientdata(client); - dprintk ("%s\n", __FUNCTION__); switch (cmd) { case FE_REGISTER: { struct dvb_adapter *dvb_adapter = (struct dvb_adapter*)arg; + struct ves1x93_state *data = (struct ves1x93_state*)i2c_get_clientdata(client); return dvb_register_frontend_new (ves1x93_ioctl, dvb_adapter, (void*) data, &ves1x93_info); } case FE_UNREGISTER: { @@ -675,7 +676,7 @@ static struct i2c_driver driver = { }; static struct i2c_client client_template = { - I2C_DEVNAME("stv0299"), + I2C_DEVNAME("ves1x93"), .flags = I2C_CLIENT_ALLOW_USE, .driver = &driver, }; |