From: Dan Carpenter Date: Tue, 14 Apr 2009 22:51:30 +0000 (-0300) Subject: V4L/DVB (11516): drivers/media/video/saa5246a.c: fix use-after-free X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=9401608bb34be14960311dbb91d4a82ee07a03fa;p=GitHub%2Fexynos8895%2Fandroid_kernel_samsung_universal8895.git V4L/DVB (11516): drivers/media/video/saa5246a.c: fix use-after-free I lowered the kfree(t) down a couple lines and removed the superflous "t->vdev = NULL;" Signed-off-by: Dan Carpenter Signed-off-by: Andrew Morton Signed-off-by: Mauro Carvalho Chehab --- diff --git a/drivers/media/video/saa5246a.c b/drivers/media/video/saa5246a.c index da47b2f05288..155804b061e9 100644 --- a/drivers/media/video/saa5246a.c +++ b/drivers/media/video/saa5246a.c @@ -1092,9 +1092,8 @@ static int saa5246a_probe(struct i2c_client *client, /* Register it */ err = video_register_device(t->vdev, VFL_TYPE_VTX, -1); if (err < 0) { - kfree(t); video_device_release(t->vdev); - t->vdev = NULL; + kfree(t); return err; } return 0;