Commit d5b53f46 authored by Erik Andren's avatar Erik Andren Committed by Mauro Carvalho Chehab

V4L/DVB (10341): gspca - stv06xx: Plug a memory leak in the pb0100 sensor driver.

Signed-off-by: default avatarErik Andren <erik.andren@gmail.com>
Signed-off-by: default avatarJean-Francois Moine <moinejf@free.fr>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@redhat.com>
parent 11fb06bd
......@@ -268,6 +268,12 @@ out:
return (err < 0) ? err : 0;
}
static void pb0100_disconnect(struct sd *sd)
{
sd->sensor = NULL;
kfree(sd->sensor_priv);
}
/* FIXME: Sort the init commands out and put them into tables,
this is only for getting the camera to work */
/* FIXME: No error handling for now,
......
......@@ -114,6 +114,7 @@ static int pb0100_start(struct sd *sd);
static int pb0100_init(struct sd *sd);
static int pb0100_stop(struct sd *sd);
static int pb0100_dump(struct sd *sd);
static void pb0100_disconnect(struct sd *sd);
/* V4L2 controls supported by the driver */
static int pb0100_get_gain(struct gspca_dev *gspca_dev, __s32 *val);
......@@ -142,6 +143,7 @@ const struct stv06xx_sensor stv06xx_sensor_pb0100 = {
.start = pb0100_start,
.stop = pb0100_stop,
.dump = pb0100_dump,
.disconnect = pb0100_disconnect,
};
#endif
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment