dsp: add change to handle use-after-free in cal_utils_is_cal_stale

Add change to address the race condition between
pointer dereference and memory deallocation.

Change-Id: Ia1ed47986ec81d3dc2feb3bc874847fadddac292
Signed-off-by: Saurav Kumar <sauravk@codeaurora.org>
This commit is contained in:
Saurav Kumar
2020-09-10 16:06:16 +05:30
parent 3e60a43938
commit 97d18542c1
7 changed files with 56 additions and 22 deletions

View File

@@ -95,5 +95,7 @@ int32_t cal_utils_get_cal_type_version(void *cal_type_data);
void cal_utils_mark_cal_used(struct cal_block_data *cal_block);
bool cal_utils_is_cal_stale(struct cal_block_data *cal_block);
bool cal_utils_is_cal_stale(struct cal_block_data *cal_block, struct cal_type_data *cal_type);
int cal_utils_init(void);
#endif