Skip to content
Commit 50e8ce14 authored by Kulikov Vasiliy's avatar Kulikov Vasiliy Committed by Mark Brown
Browse files

ASoC: imx: check kzalloc() result and fix memory leak



If kzalloc() fails we must exit with -ENOMEM. Also we must free
allocated runtime->private_data on error as it would be lost on next
call to snd_imx_open().

Signed-off-by: default avatarKulikov Vasiliy <segooon@gmail.com>
Acked-by: default avatarLiam Girdwood <lrg@slimlogic.co.uk>
Signed-off-by: default avatarMark Brown <broonie@opensource.wolfsonmicro.com>
parent 51b6dfb6
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment