ALSA: ASoC: Fix NULL pointer dereference in __pxa2xx_pcm_hw_free
Subsystems (2)
PATCH 1/1 ALSA: ASoC: Fix NULL pointer dereference in __pxa2xx_pcm_hw_free
Check for rtd->params->drcmr != NULL before accessing it.
Signed-off-by Daniel Mack <[email protected]>
Cc Eric Miao <[email protected]>
Cc Mark Brown <[email protected]>
--- sound/arm/pxa2xx-pcm-lib.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)
sound/arm/pxa2xx-pcm-lib.c +1 -1
@@ -75,7 +75,7 @@ int __pxa2xx_pcm_hw_free(struct snd_pcm_substream *substream) {struct pxa2xx_runtime_data *rtd = substream->runtime->private_data; -if (rtd && rtd->params) +if (rtd && rtd->params && rtd->params->drcmr) *rtd->params->drcmr =0 ;snd_pcm_set_runtime_buffer (substream,NULL );
Signature · 1 line
1.6.3.1
Mark Brown
AppliedQuoted 3 lines · Daniel Mack
Check for
rtd->params->drcmr!= NULL before accessing it.Signed-off-by Daniel Mack <[email protected]>
Applied, thanks.