Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 3083f4ab authored by Linux Build Service Account's avatar Linux Build Service Account Committed by Gerrit - the friendly Code Review server
Browse files

Merge "ASoC : msm: qdsp6v2: set pointer to NULL after free."

parents 7d5804c2 35a28c7b
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -1248,6 +1248,7 @@ static int msm_compr_free(struct snd_compr_stream *cstream)
	kfree(pdata->dec_params[soc_prtd->dai_link->be_id]);
	pdata->dec_params[soc_prtd->dai_link->be_id] = NULL;
	kfree(prtd);
	runtime->private_data = NULL;

	return 0;
}
+2 −1
Original line number Diff line number Diff line
/* Copyright (c) 2012-2016, The Linux Foundation. All rights reserved.
/* Copyright (c) 2012-2017, The Linux Foundation. All rights reserved.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 and
@@ -499,6 +499,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)
+2 −1
Original line number Diff line number Diff line
/* Copyright (c) 2012-2014, 2016, The Linux Foundation. All rights reserved.
/* Copyright (c) 2012-2014, 2017,  The Linux Foundation. All rights reserved.
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License version 2 and
@@ -497,6 +497,7 @@ static int msm_pcm_playback_close(struct snd_pcm_substream *substream)

	pr_debug("%s\n", __func__);
	kfree(prtd);
	runtime->private_data = NULL;

	return 0;
}
+4 −1
Original line number Diff line number Diff line
/* Copyright (c) 2012-2016, The Linux Foundation. All rights reserved.
/* Copyright (c) 2012-2017, The Linux Foundation. All rights reserved.
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License version 2 and
@@ -696,6 +696,8 @@ static int msm_pcm_playback_close(struct snd_pcm_substream *substream)
	msm_pcm_routing_dereg_phy_stream(soc_prtd->dai_link->be_id,
						SNDRV_PCM_STREAM_PLAYBACK);
	kfree(prtd);
	runtime->private_data = NULL;

	return 0;
}

@@ -799,6 +801,7 @@ static int msm_pcm_capture_close(struct snd_pcm_substream *substream)
	msm_pcm_routing_dereg_phy_stream(soc_prtd->dai_link->be_id,
		SNDRV_PCM_STREAM_CAPTURE);
	kfree(prtd);
	runtime->private_data = NULL;

	return 0;
}