Skip to content

Commit 2c87d9d

Browse files
Andre BartkeMauro Carvalho Chehab
authored andcommitted
[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>
1 parent 7ce338d commit 2c87d9d

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

‎drivers/media/video/cx18/cx18-alsa-main.c‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -192,6 +192,7 @@ static int snd_cx18_init(struct v4l2_device *v4l2_dev)
192192
err_exit_free:
193193
if (sc != NULL)
194194
snd_card_free(sc);
195+
kfree(cxsc);
195196
err_exit:
196197
return ret;
197198
}

0 commit comments

Comments
 (0)