提交 3609ff5c 编写于 作者: S shenglian zhou

fix: use after free error

上级 0ee72024
......@@ -259,13 +259,14 @@ static inline char *insertTags(char *sql, char *tags) {
// nest call
part2 = insertTags(sub_sql, tags);
free(sub_sql);
if (part2 == NULL) {
// unknown format, can not insert tags
tscError("TAGS insertTags sub select sql failed. subsql=%s sql=%s", sub_sql, sql);
free(sub_sql);
free(buf);
return NULL;
}
free(sub_sql);
// new string is part1 + part2 + part 3
strncpy(buf, p, part1_end - p + 1);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册