浏览代码

[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>
Andre Bartke 14 年之前
父节点
当前提交
2c87d9db46
共有 1 个文件被更改,包括 1 次插入0 次删除
  1. 1 0
      drivers/media/video/cx18/cx18-alsa-main.c

+ 1 - 0
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;
 }