filter_lua: fix null dereference (CID 183996)
@@ -64,6 +64,7 @@ struct lua_filter *lua_config_create(struct flb_filter_instance *ins,
flb_free(lf);
return NULL;
}
+ script = tmp;
/* Compose path */
ret = stat(tmp, &st);
@@ -79,9 +80,6 @@ struct lua_filter *lua_config_create(struct flb_filter_instance *ins,
script = buf;
}
}
- else {
- script = tmp;
- }
/* Validate script path */
ret = access(script, R_OK);
