summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPřemysl Janouch <p.janouch@gmail.com>2016-01-09 05:05:46 +0100
committerPřemysl Janouch <p.janouch@gmail.com>2016-01-09 05:05:46 +0100
commitfaa0c989f83725745f255840bfcfe28b9f88db95 (patch)
treec0e760d0627c4c414ceae45e2e6d4efc20159394
parent53e72dd12d310c9836cf1f74a6a93b550c881655 (diff)
downloadxK-faa0c989f83725745f255840bfcfe28b9f88db95.tar.gz
xK-faa0c989f83725745f255840bfcfe28b9f88db95.tar.xz
xK-faa0c989f83725745f255840bfcfe28b9f88db95.zip
degesch: Lua: actually allow filtering out input
-rw-r--r--degesch.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/degesch.c b/degesch.c
index 5621f96..e42f015 100644
--- a/degesch.c
+++ b/degesch.c
@@ -7649,7 +7649,11 @@ lua_plugin_handle_string_filter_result (struct lua_plugin *self,
{
lua_State *L = self->L;
if (lua_isnil (L, -1))
+ {
+ free (*original);
+ *original = NULL;
return true;
+ }
if (!lua_isstring (L, -1))
FAIL ("must return either a string or nil");