diff options
author | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2016-01-25 15:49:27 +0000 |
---|---|---|
committer | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2016-01-25 15:49:27 +0000 |
commit | 5eb9938636b0ef004df7038eeae4fa98c0cb208e (patch) | |
tree | 985c951545ec628357c6aee3d0c209fec63f0ae2 /src/lua/lua_sqlite3.c | |
parent | 8881a3f927d65aa49ba81486f5fb78efafb090bd (diff) | |
download | rspamd-5eb9938636b0ef004df7038eeae4fa98c0cb208e.tar.gz rspamd-5eb9938636b0ef004df7038eeae4fa98c0cb208e.zip |
Fix more issues
Diffstat (limited to 'src/lua/lua_sqlite3.c')
-rw-r--r-- | src/lua/lua_sqlite3.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/src/lua/lua_sqlite3.c b/src/lua/lua_sqlite3.c index 708a74452..1f8eac143 100644 --- a/src/lua/lua_sqlite3.c +++ b/src/lua/lua_sqlite3.c @@ -99,16 +99,22 @@ lua_sqlite3_open (lua_State *L) { const gchar *path = luaL_checkstring (L, 1); sqlite3 *db, **pdb; + GError *err = NULL; if (path == NULL) { lua_pushnil (L); return 1; } - db = rspamd_sqlite3_open_or_create (NULL, path, NULL, NULL); + db = rspamd_sqlite3_open_or_create (NULL, path, NULL, &err); if (db == NULL) { + if (err) { + msg_err ("cannot open db: %e", err); + g_error_free (err); + } lua_pushnil (L); + return 1; } |