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 <quic_mnd@quicinc.com>
This commit is contained in:
Manoj Kumar N D 2022-12-13 12:16:31 +05:30 • committed by Gerrit - the friendly Code Review server
commit 7d196f8368

View file

@ -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 <linux/slab.h>
#include <linux/fs.h>
@ -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;
}