From 7d196f8368cffb9a735f3f58531e7b4a63e820dc Mon Sep 17 00:00:00 2001 From: Manoj Kumar N D Date: Tue, 13 Dec 2022 12:16:31 +0530 Subject: [PATCH] dsp : assign null to pointer that has freed address After freeing up the memory assign null to the pointer that had the address. Change-Id: I242a936c434dc449ec9fd19b0c34e843c3cf0913 Signed-off-by: Manoj Kumar N D --- dsp/audio_cal_utils.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/dsp/audio_cal_utils.c b/dsp/audio_cal_utils.c index 01e9c349142d..1406088b4ea6 100644 --- a/dsp/audio_cal_utils.c +++ b/dsp/audio_cal_utils.c @@ -1,6 +1,7 @@ // SPDX-License-Identifier: GPL-2.0-only /* * Copyright (c) 2014-2020, The Linux Foundation. All rights reserved. + * Copyright (c) 2022-2023 Qualcomm Innovation Center, Inc. All rights reserved. */ #include #include @@ -458,6 +459,7 @@ static void delete_cal_block(struct cal_block_data *cal_block) cal_block->map_data.dma_buf = NULL; } kfree(cal_block); + cal_block = NULL; done: return; }