Skip to content

Commit

Permalink
[media] drivers/media/video: fix memory leak of snd_cx18_init()
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Andre Bartke authored and Mauro Carvalho Chehab committed Jul 27, 2011
1 parent 7ce338d commit 2c87d9d
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions drivers/media/video/cx18/cx18-alsa-main.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down

0 comments on commit 2c87d9d

Please sign in to comment.