diff options
author | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2015-02-05 18:20:22 +0000 |
---|---|---|
committer | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2015-02-05 18:20:22 +0000 |
commit | 1e08514471896e3b3069cdc25f457036d257cc68 (patch) | |
tree | b591aa5d3eac5fec70d137d664ccc4b95db63cc4 /src/libstat | |
parent | 9068c5040e2737ce70f0cc9498000efa30c14c74 (diff) | |
download | rspamd-1e08514471896e3b3069cdc25f457036d257cc68.tar.gz rspamd-1e08514471896e3b3069cdc25f457036d257cc68.zip |
Fix potential issues as found by coverity.
Diffstat (limited to 'src/libstat')
-rw-r--r-- | src/libstat/backends/mmaped_file.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/libstat/backends/mmaped_file.c b/src/libstat/backends/mmaped_file.c index aa99b0902..0fb386f61 100644 --- a/src/libstat/backends/mmaped_file.c +++ b/src/libstat/backends/mmaped_file.c @@ -444,6 +444,10 @@ rspamd_mmaped_file_reindex (rspamd_mmaped_file_ctx * pool, new = rspamd_mmaped_file_open (pool, filename, size, stcf); if (fd == -1 || new == NULL) { + if (fd != -1) { + close (fd); + } + msg_err ("cannot open file: %s", strerror (errno)); g_free (backup); return NULL; |