fix: change stack to malloc reduce memory
This commit is contained in:
parent
728c3fcfb5
commit
a81de6e06c
|
@ -1152,7 +1152,7 @@ void shellSourceFile(const char *file) {
|
|||
|
||||
bool shellGetGrantInfo(char* buf) {
|
||||
bool community = true;
|
||||
char sinfo[128] = {0};
|
||||
char sinfo[256] = {0};
|
||||
tstrncpy(sinfo, taos_get_server_info(shell.conn), sizeof(sinfo));
|
||||
strtok(sinfo, "\r\n");
|
||||
|
||||
|
@ -1368,7 +1368,7 @@ int32_t shellExecute() {
|
|||
#ifdef WEBSOCKET
|
||||
if (!shell.args.restful && !shell.args.cloud) {
|
||||
#endif
|
||||
char buf[356] = "";
|
||||
char* buf = taosMemoryMalloc(512);
|
||||
bool community = shellGetGrantInfo(buf);
|
||||
#ifndef WINDOWS
|
||||
printfIntroduction(community);
|
||||
|
@ -1383,6 +1383,7 @@ bool community = shellGetGrantInfo(buf);
|
|||
if(!community) {
|
||||
printf("%s\n", buf);
|
||||
}
|
||||
taosMemoryFree(buf);
|
||||
|
||||
#ifdef WEBSOCKET
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue