summaryrefslogtreecommitdiff
path: root/server/reds.c
diff options
context:
space:
mode:
Diffstat (limited to 'server/reds.c')
-rw-r--r--server/reds.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/server/reds.c b/server/reds.c
index 57ef07aa..c74894a0 100644
--- a/server/reds.c
+++ b/server/reds.c
@@ -3291,6 +3291,7 @@ static int do_spice_init(SpiceCoreInterface *core_interface)
shm_name_len = strlen(SPICE_STAT_SHM_NAME) + 20;
reds->stat_shm_name = (char *)spice_malloc(shm_name_len);
snprintf(reds->stat_shm_name, shm_name_len, SPICE_STAT_SHM_NAME, getpid());
+ shm_unlink(reds->stat_shm_name);
if ((fd = shm_open(reds->stat_shm_name, O_CREAT | O_RDWR, 0444)) == -1) {
spice_error("statistics shm_open failed, %s", strerror(errno));
}