[alsa-devel] [patch 1/4] ASoC: dapm: fix error path in snd_soc_dapm_new_pcm
Mark Brown
broonie at kernel.org
Sun Aug 27 14:43:05 CEST 2017
On Sat, Aug 26, 2017 at 01:29:25AM -0700, anish kumar wrote:
> Before freeing the memory, check if it was allcoated.
> -outfree_w_param:
> for (count = 0 ; count < num_params; count++)
> - devm_kfree(card->dev, (void *)w_param_text[count]);
> + if (w_param_text[count])
> + devm_kfree(card->dev, (void *)w_param_text[count]);
There's no need to do this, devm_kfree() will handle null pointers fine.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 488 bytes
Desc: not available
URL: <http://mailman.alsa-project.org/pipermail/alsa-devel/attachments/20170827/91cc68ab/attachment.sig>
More information about the Alsa-devel
mailing list