From e3058de235c1dd425b98acd10f4d8dae21c83cca Mon Sep 17 00:00:00 2001 From: Ralph Dolmans Date: Mon, 10 Apr 2017 12:58:26 +0000 Subject: [PATCH] - Use correct identifier for SHM destroy. git-svn-id: file:///svn/unbound/trunk@4103 be551aaa-1e26-0410-a405-d3ace91eadb9 --- doc/Changelog | 1 + util/shm_side/shm_main.c | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/doc/Changelog b/doc/Changelog index eb30d8d34..1bc6fafce 100644 --- a/doc/Changelog +++ b/doc/Changelog @@ -3,6 +3,7 @@ - Fix small memory leak in edns_opt_copy_alloc. - Respip dereference after NULL check. - Zero initialize addrtree allocation. + - Use correct identifier for SHM destroy. 7 April 2017: George - Fix pythonmod for cb changes. diff --git a/util/shm_side/shm_main.c b/util/shm_side/shm_main.c index 2911db790..1753b15e2 100644 --- a/util/shm_side/shm_main.c +++ b/util/shm_side/shm_main.c @@ -118,7 +118,7 @@ int shm_main_init(struct daemon* daemon) /* Destroy previous SHM */ if (daemon->shm_info->id_arr >= 0) - shmctl(daemon->shm_info->id_ctl, IPC_RMID, NULL); + shmctl(daemon->shm_info->id_arr, IPC_RMID, NULL); /* SHM: Create the segment */ daemon->shm_info->id_ctl = shmget(daemon->shm_info->key, sizeof(struct shm_stat_info), IPC_CREAT | 0666);