提交 1ed5309d 编写于 作者: H Haojun Liao

[td-717] fix memory leak in taosdemo.c

上级 9a4414c3
......@@ -470,11 +470,12 @@ int main(int argc, char *argv[]) {
char command[BUFFER_SIZE] = "\0";
sprintf(command, "drop database %s;", db_name);
taos_query(taos, command);
TAOS_RES* res = taos_query(taos, command);
taos_free_result(res);
sprintf(command, "create database %s;", db_name);
taos_query(taos, command);
res = taos_query(taos, command);
taos_free_result(res);
char cols[STRING_LEN] = "\0";
int colIndex = 0;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册