summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/lib/shm_flow_set.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/lib/shm_flow_set.c b/src/lib/shm_flow_set.c
index 9d0e6c83..ca3a1a87 100644
--- a/src/lib/shm_flow_set.c
+++ b/src/lib/shm_flow_set.c
@@ -84,9 +84,13 @@ struct shm_flow_set * shm_flow_set_create()
mode_t mask;
int shm_fd;
int i;
+ struct stat st;
sprintf(fn, SHM_FLOW_SET_PREFIX "%d", getpid());
+ if (stat(fn, &st) != -1 && unlink(fn))
+ return NULL;
+
set = malloc(sizeof(*set));
if (set == NULL)
return NULL;