fix maat_redis_tool, fix some mem leaks, use (uuid_t *) type as para of function to avoid some problems

This commit is contained in:
root
2024-09-27 11:38:41 +00:00
parent 3315428974
commit 3bbbd53f39
21 changed files with 313 additions and 296 deletions

View File

@@ -133,10 +133,10 @@ expr_item_new(struct expr_schema *expr_schema, const char *table_name,
}
uuid_parse(tmp_obj->valuestring, expr_item->object_uuid);
tmp_obj = cJSON_GetObjectItem(json, "keywords");
tmp_obj = cJSON_GetObjectItem(json, "expression");
if (tmp_obj == NULL || tmp_obj->type != cJSON_String) {
log_fatal(expr_rt->logger, MODULE_EXPR,
"[%s:%d] expr table:<%s> has no keywords in line:%s",
"[%s:%d] expr table:<%s> has no expression in line:%s",
__FUNCTION__, __LINE__, table_name, cJSON_Print(json));
goto error;
}
@@ -144,7 +144,7 @@ expr_item_new(struct expr_schema *expr_schema, const char *table_name,
if (len > MAX_KEYWORDS_STR_LEN) {
log_fatal(expr_rt->logger, MODULE_EXPR,
"[%s:%d] expr table:<%s> keywords length too long in line:%s",
"[%s:%d] expr table:<%s> expression length too long in line:%s",
__FUNCTION__, __LINE__, table_name, cJSON_Print(json));
goto error;
}