summaryrefslogtreecommitdiffstats
path: root/mbbsd
diff options
context:
space:
mode:
Diffstat (limited to 'mbbsd')
-rw-r--r--mbbsd/emaildb.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/mbbsd/emaildb.c b/mbbsd/emaildb.c
index 90cd567e..45b634ce 100644
--- a/mbbsd/emaildb.c
+++ b/mbbsd/emaildb.c
@@ -4,6 +4,10 @@
#define EMAILDB_PATH BBSHOME "/emaildb.db"
+#if defined(__GLIBC__)
+void __libc_freeres();
+#endif
+
static int emaildb_open(sqlite3 **Db) {
int rc;
@@ -96,6 +100,10 @@ end:
if (Db != NULL)
sqlite3_close(Db);
+#if defined(__GLIBC__)
+ __libc_freeres(); // discovered by wens, to reduce internal cache caused by sqlite.
+#endif
+
return ret;
}