From: Andre Bartke Date: Fri, 3 Jun 2011 18:06:58 +0000 (-0300) Subject: [media] drivers/media/video: fix memory leak of snd_cx18_init() X-Git-Tag: v3.1-rc1~116^2~308 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=2c87d9db46d1dcc956facaf98805d4d68b823b23;p=platform%2Fkernel%2Flinux-3.10.git [media] drivers/media/video: fix memory leak of snd_cx18_init() cxsc is not freed in the error case. Signed-off-by: Andre Bartke Cc: Andy Walls Signed-off-by: Mauro Carvalho Chehab --- diff --git a/drivers/media/video/cx18/cx18-alsa-main.c b/drivers/media/video/cx18/cx18-alsa-main.c index d50d69d..a1e6c2a 100644 --- a/drivers/media/video/cx18/cx18-alsa-main.c +++ b/drivers/media/video/cx18/cx18-alsa-main.c @@ -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; }