diff options
author | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2016-06-10 18:47:25 +0100 |
---|---|---|
committer | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2016-06-10 18:47:25 +0100 |
commit | ec64510fc496ca6e01576a53bb7862b7a9308cd3 (patch) | |
tree | c99976901c62e8d9bf142a3ffb6b3931e896e7ce /src/libutil/http_private.h | |
parent | e9e67d85ef8eddc7e38f57b8e11e9eac8ac1ac54 (diff) | |
download | rspamd-ec64510fc496ca6e01576a53bb7862b7a9308cd3.tar.gz rspamd-ec64510fc496ca6e01576a53bb7862b7a9308cd3.zip |
[Fix] Fix race condition with shared memory by refcounts
Diffstat (limited to 'src/libutil/http_private.h')
-rw-r--r-- | src/libutil/http_private.h | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/libutil/http_private.h b/src/libutil/http_private.h index a944cb31b..38fbec742 100644 --- a/src/libutil/http_private.h +++ b/src/libutil/http_private.h @@ -18,6 +18,7 @@ #include "http.h" #include "str_util.h" +#include "ref.h" #include "../../contrib/mumhash/mum.h" #define HASH_CASELESS #include "uthash_strcase.h" @@ -52,8 +53,11 @@ struct rspamd_http_message { /* Internal storage */ union _rspamd_storage_u { rspamd_fstring_t *normal; - struct { - gchar *shm_name; + struct _rspamd_storage_shared_s { + struct _rspamd_storage_shmem_s { + gchar *shm_name; + ref_entry_t ref; + } *name; gint shm_fd; } shared; } c; |