Browse Source

[Fix] Fix descriptors leak in sqlite3 locking code

tags/1.7.8
Vsevolod Stakhov 6 years ago
parent
commit
ccefb86651
1 changed files with 2 additions and 2 deletions
  1. 2
    2
      src/libutil/sqlite_utils.c

+ 2
- 2
src/libutil/sqlite_utils.c View File

@@ -261,6 +261,8 @@ rspamd_sqlite3_wait (rspamd_mempool_t *pool, const gchar *lock)
}
}

close (fd);

if (nanosleep (&sleep_ts, NULL) == -1 && errno != EINTR) {
msg_err_pool_check ("cannot sleep open lock file %s: %s", lock,
strerror (errno));
@@ -358,8 +360,6 @@ rspamd_sqlite3_open_or_create (rspamd_mempool_t *pool, const gchar *path, const
has_lock = TRUE;
}

sqlite3_enable_shared_cache (1);

if ((rc = sqlite3_open_v2 (path, &sqlite,
flags, NULL)) != SQLITE_OK) {
#if SQLITE_VERSION_NUMBER >= 3008000

Loading…
Cancel
Save