]> bbs.cooldavid.org Git - net-next-2.6.git/commitdiff
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 5b3eaa16afd2261f1253b702b81dad9362604f6c..c4dab6cfd9487dd2dd5c6c841eb7a852dff2b49f 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: