From 2d2a78422054ed9fea973dbf777d360f5e7ac736 Mon Sep 17 00:00:00 2001 From: jtao1735 Date: Sun, 3 May 2020 00:13:06 +0000 Subject: [PATCH] initialize SCqCfg structure remove two unsed fields in tsclient.h --- src/client/inc/tsclient.h | 2 -- src/util/src/tsocket.c | 2 ++ src/vnode/src/vnodeMain.c | 3 ++- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/src/client/inc/tsclient.h b/src/client/inc/tsclient.h index e8278ea145..d04fa9900d 100644 --- a/src/client/inc/tsclient.h +++ b/src/client/inc/tsclient.h @@ -312,8 +312,6 @@ typedef struct SSqlObj { void (*fp)(); void (*fetchFp)(); void * param; - uint32_t ip; - short vnode; int64_t stime; uint32_t queryId; void * pStream; diff --git a/src/util/src/tsocket.c b/src/util/src/tsocket.c index c665ef9679..efdf752960 100644 --- a/src/util/src/tsocket.c +++ b/src/util/src/tsocket.c @@ -32,6 +32,8 @@ int taosGetFqdn(char *fqdn) { uError("failed to get host name"); return -1; } + + free(h); } uint32_t taosGetIpFromFqdn(const char *fqdn) { diff --git a/src/vnode/src/vnodeMain.c b/src/vnode/src/vnodeMain.c index 03e508c5bf..2a7d133039 100644 --- a/src/vnode/src/vnodeMain.c +++ b/src/vnode/src/vnodeMain.c @@ -194,9 +194,10 @@ int32_t vnodeOpen(int32_t vnode, char *rootDir) { pVnode->wqueue = dnodeAllocateWqueue(pVnode); pVnode->rqueue = dnodeAllocateRqueue(pVnode); - SCqCfg cqCfg; + SCqCfg cqCfg = {0}; sprintf(cqCfg.user, "root"); strcpy(cqCfg.pass, tsInternalPass); + cqCfg.vgId = vnode; cqCfg.cqWrite = vnodeWriteToQueue; pVnode->cq = cqOpen(pVnode, &cqCfg);