V4L/DVB (13964): tuner-core, fix memory leak
authorJiri Slaby <jslaby@suse.cz>
Wed, 6 Jan 2010 16:45:28 +0000 (13:45 -0300)
committerMauro Carvalho Chehab <mchehab@redhat.com>
Fri, 26 Feb 2010 18:10:34 +0000 (15:10 -0300)
Stanse found a memory leak in tuner_probe. It is not freed/assigned
on all paths. Fix that.

Signed-off-by: Jiri Slaby <jslaby@suse.cz>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
drivers/media/video/tuner-core.c

index 5b3eaa1..c4dab6c 100644 (file)
@@ -1078,6 +1078,7 @@ static int tuner_probe(struct i2c_client *client,
 
                                goto register_client;
                        }
+                       kfree(t);
                        return -ENODEV;
                case 0x42:
                case 0x43: