aboutsummaryrefslogtreecommitdiffstats
path: root/src/lua/lua_cdb.c
diff options
context:
space:
mode:
authorVsevolod Stakhov <vsevolod@highsecure.ru>2016-02-16 13:44:35 +0000
committerVsevolod Stakhov <vsevolod@highsecure.ru>2016-02-16 13:44:35 +0000
commit3256178a2433f242f69c55f6eaee36ea314b2f1a (patch)
tree69323a953a69d4d62c9c57e695c6f84ac9527bb8 /src/lua/lua_cdb.c
parent5c25ee027e883ea5251958ecee14ea5fc3e68946 (diff)
downloadrspamd-3256178a2433f242f69c55f6eaee36ea314b2f1a.tar.gz
rspamd-3256178a2433f242f69c55f6eaee36ea314b2f1a.zip
Fix couple of issues found by gcc-6
Diffstat (limited to 'src/lua/lua_cdb.c')
-rw-r--r--src/lua/lua_cdb.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/lua/lua_cdb.c b/src/lua/lua_cdb.c
index de0ac67a0..b0e6df32e 100644
--- a/src/lua/lua_cdb.c
+++ b/src/lua/lua_cdb.c
@@ -85,6 +85,10 @@ lua_cdb_get_name (lua_State *L)
{
struct cdb *cdb = lua_check_cdb (L);
+ if (!cdb) {
+ lua_error (L);
+ return 1;
+ }
lua_pushstring (L, cdb->filename);
return 1;
}
@@ -98,6 +102,10 @@ lua_cdb_lookup (lua_State *L)
gsize vlen;
gint64 vpos;
+ if (!cdb) {
+ lua_error (L);
+ return 1;
+ }
/*
* XXX: this code is placed here because event_loop is called inside workers, so start
* monitoring on first check, not on creation