Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

[media] drivers/media/video: fix memory leak of snd_cx18_init()

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>

authored by

Andre Bartke and committed by
Mauro Carvalho Chehab
2c87d9db 7ce338d9

+1
+1
drivers/media/video/cx18/cx18-alsa-main.c
··· 192 192 err_exit_free: 193 193 if (sc != NULL) 194 194 snd_card_free(sc); 195 + kfree(cxsc); 195 196 err_exit: 196 197 return ret; 197 198 }