Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 9401608b authored by Dan Carpenter's avatar Dan Carpenter Committed by Mauro Carvalho Chehab
Browse files

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: default avatarDan Carpenter <error27@gmail.com>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@redhat.com>
parent 5b83cfa9
Loading
Loading
Loading
Loading
+1 −2
Original line number Diff line number Diff line
@@ -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;