mirror of
https://github.com/followmsi/android_kernel_google_msm.git
synced 2024-11-06 23:17:41 +00:00
ASoC: msm: qdsp6v2: set pointer to NULL after free.
Pointer after kfree is not sanitized. Set pointer to NULL. CRs-Fixed: 2008031 Change-Id: Ia59a57fcd142a6ed18d168992b8da4019314afa4 Signed-off-by: Xiaojun Sang <xsang@codeaurora.org> Signed-off-by: Bikshapathi Kothapeta <bkotha@codeaurora.org>
This commit is contained in:
parent
1feb1d1e7c
commit
b293354c82
3 changed files with 5 additions and 0 deletions
|
@ -396,6 +396,7 @@ done:
|
|||
mutex_unlock(&prtd->lock);
|
||||
prtd->prepared--;
|
||||
kfree(prtd);
|
||||
runtime->private_data = NULL;
|
||||
return 0;
|
||||
}
|
||||
static int msm_afe_prepare(struct snd_pcm_substream *substream)
|
||||
|
|
|
@ -391,6 +391,7 @@ static int msm_pcm_playback_close(struct snd_pcm_substream *substream)
|
|||
pr_debug("%s\n", __func__);
|
||||
q6asm_audio_client_free(prtd->audio_client);
|
||||
kfree(prtd);
|
||||
runtime->private_data = NULL;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
|
|
@ -446,6 +446,8 @@ static int msm_pcm_playback_close(struct snd_pcm_substream *substream)
|
|||
SNDRV_PCM_STREAM_PLAYBACK);
|
||||
q6asm_audio_client_free(prtd->audio_client);
|
||||
kfree(prtd);
|
||||
runtime->private_data = NULL;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
@ -538,6 +540,7 @@ static int msm_pcm_capture_close(struct snd_pcm_substream *substream)
|
|||
SNDRV_PCM_STREAM_CAPTURE);
|
||||
q6asm_audio_client_free(prtd->audio_client);
|
||||
kfree(prtd);
|
||||
runtime->private_data = NULL;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue