struct lua_callback_data *cd;
if (metric) {
- name = luaL_checkstring (L, 2);
+ name = g_strdup (luaL_checkstring (L, 2));
weight = luaL_checknumber (L, 3);
callback = luaL_checkstring (L, 4);
if (name) {
int i, top;
if (task != NULL) {
- metric_name = luaL_checkstring (L, 2);
- symbol_name = luaL_checkstring (L, 3);
+ metric_name = memory_pool_strdup (task->task_pool, luaL_checkstring (L, 2));
+ symbol_name = memory_pool_strdup (task->task_pool, luaL_checkstring (L, 3));
flag = luaL_checknumber (L, 4);
top = lua_gettop (L);
/* Get additional options */
-- };
-metric = 'default'
-symbol = 'RECEIVED_RBL'
-rbls = {}
+local metric = 'default'
+local symbol = 'RECEIVED_RBL'
+local rbls = {}
function dns_cb(task, to_resolve, results, err)
if results then
re = parse_regexp (task->cfg->cfg_pool, it->content.operand, task->cfg->raw_mode);
if (re == NULL) {
msg_warn ("process_regexp_expression: cannot parse regexp, skip expression");
+ g_queue_free (stack);
return FALSE;
}
it->content.operand = re;
if (!g_queue_is_empty (stack)) {
op1 = GPOINTER_TO_SIZE (g_queue_pop_head (stack));
if (op1) {
+ g_queue_free (stack);
return TRUE;
}
}
g_match_info_free (info);
return result;
}
+ g_match_info_free (info);
}
/* Try to match normal domain */
if (g_regex_match_full (surbl_module_ctx->extract_normal_regexp, hostname->begin, hostname->len, 0, 0, &info, NULL) == TRUE) {