]> git.karo-electronics.de Git - linux-beck.git/commitdiff
[media] drivers/media/video: fix memory leak of snd_cx18_init()
authorAndre Bartke <andre.bartke@googlemail.com>
Fri, 3 Jun 2011 18:06:58 +0000 (15:06 -0300)
committerMauro Carvalho Chehab <mchehab@redhat.com>
Wed, 27 Jul 2011 20:52:59 +0000 (17:52 -0300)
cxsc is not freed in the error case.

Signed-off-by: Andre Bartke <andre.bartke@gmail.com>
Cc: Andy Walls <awalls@md.metrocast.net>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
drivers/media/video/cx18/cx18-alsa-main.c

index d50d69da387b5d0ea30fb6be335c7fb23523e55b..a1e6c2a32478225ef0860f61ea1688f723ab2443 100644 (file)
@@ -192,6 +192,7 @@ static int snd_cx18_init(struct v4l2_device *v4l2_dev)
 err_exit_free:
        if (sc != NULL)
                snd_card_free(sc);
+       kfree(cxsc);
 err_exit:
        return ret;
 }