diff options
author | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2016-09-08 16:20:30 +0100 |
---|---|---|
committer | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2016-09-08 17:00:14 +0100 |
commit | e3c5642da397104ed4d5c0171353e997f4ceba77 (patch) | |
tree | 94c4b861d7f135c53910a34a92cf9565702cbdcf | |
parent | 4a6fc235b12c6e60a4fea6751d85fdb22a24ed45 (diff) | |
download | rspamd-e3c5642da397104ed4d5c0171353e997f4ceba77.tar.gz rspamd-e3c5642da397104ed4d5c0171353e997f4ceba77.zip |
[Minor] Improve shared memory fd check
-rw-r--r-- | src/libutil/http.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/libutil/http.c b/src/libutil/http.c index ba62b422d..e8f049ddc 100644 --- a/src/libutil/http.c +++ b/src/libutil/http.c @@ -2546,7 +2546,7 @@ rspamd_http_message_storage_cleanup (struct rspamd_http_message *msg) if (msg->flags & RSPAMD_HTTP_FLAG_SHMEM) { storage = &msg->body_buf.c; - if (storage->shared.shm_fd != -1) { + if (storage->shared.shm_fd > 0) { g_assert (fstat (storage->shared.shm_fd, &st) != -1); if (msg->body_buf.str != MAP_FAILED) { |