Re: [alsa-devel] [PATCH] ASoC: Intel: Skylake: prevent memory leak in snd_skl_parse_uuids
25 Sep
2019
25 Sep
'19
12:48 p.m.
On Tue, Sep 24, 2019 at 11:08:38PM -0500, Navid Emamdoost wrote:
In snd_skl_parse_uuids if allocation for module->instance_id fails, the allocated memory for module shoulde be released.
Since it's using devm_*() for the second allocation it would be cleaner to either switch it to regular kcalloc() or to switch the first one to devm_kzalloc(), whatever suits better.
module->instance_id = devm_kzalloc(ctx->dev, size, GFP_KERNEL); if (!module->instance_id) {
kfree(module);
--
With Best Regards,
Andy Shevchenko
1915
Age (days ago)
1915
Last active (days ago)
0 comments
1 participants
participants (1)
-
Andy Shevchenko