
24 Apr
2025
24 Apr
'25
9:19 a.m.
From: Wenkai Lin <linwenkai6@hisilicon.com> The full life cycle of the shared memory is shmget(create memory), shmat(attach to the process), shmdt(detach to the process) and shmctl(delete memory), so fix for the uadk code according to this rule. Signed-off-by: Wenkai Lin <linwenkai6@hisilicon.com> Signed-off-by: Qi Tao <taoqi10@huawei.com> --- wd_util.c | 1 + 1 file changed, 1 insertion(+) diff --git a/wd_util.c b/wd_util.c index 2236b957..af4d949b 100644 --- a/wd_util.c +++ b/wd_util.c @@ -205,6 +205,7 @@ static void wd_shm_delete(struct wd_ctx_config_internal *in) return; /* deleted shared memory */ + shmdt(in->msg_cnt); shmctl(in->shmid, IPC_RMID, NULL); in->shmid = 0; -- 2.33.0