fix memory leakage
This commit is contained in:
parent
03c19aa887
commit
748df84238
|
@ -587,6 +587,7 @@ char *metaTbCursorNext(SMTbCursor *pTbCur) {
|
|||
pBuf = value.data;
|
||||
metaDecodeTbInfo(pBuf, &tbCfg);
|
||||
if (tbCfg.type == META_SUPER_TABLE) {
|
||||
free(tbCfg.name);
|
||||
free(tbCfg.stbCfg.pTagSchema);
|
||||
continue;
|
||||
} else if (tbCfg.type == META_CHILD_TABLE) {
|
||||
|
|
|
@ -82,6 +82,7 @@ STQ* tqOpen(const char* path, SWal* pWal, SMeta* pMeta, STqCfg* tqConfig, SMemAl
|
|||
|
||||
void tqClose(STQ* pTq) {
|
||||
if (pTq) {
|
||||
tfree(pTq->path);
|
||||
free(pTq);
|
||||
}
|
||||
// TODO
|
||||
|
|
|
@ -114,3 +114,4 @@ static void vArenaNodeFree(SVArenaNode *pNode) {
|
|||
if (pNode) {
|
||||
free(pNode);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -217,6 +217,7 @@ static int32_t vnodeGetTableList(SVnode *pVnode, SRpcMsg *pMsg) {
|
|||
STR_TO_VARSTR(p, n);
|
||||
|
||||
p += (TSDB_TABLE_NAME_LEN + VARSTR_HEADER_SIZE);
|
||||
free(n);
|
||||
}
|
||||
|
||||
pFetchRsp->numOfRows = htonl(numOfTables);
|
||||
|
@ -231,10 +232,6 @@ static int32_t vnodeGetTableList(SVnode *pVnode, SRpcMsg *pMsg) {
|
|||
};
|
||||
|
||||
rpcSendResponse(&rpcMsg);
|
||||
for (int i = 0; i < taosArrayGetSize(pArray); i++) {
|
||||
name = *(char **)taosArrayGet(pArray, i);
|
||||
free(name);
|
||||
}
|
||||
|
||||
taosArrayDestroyEx(pArray, freeItemHelper);
|
||||
return 0;
|
||||
|
|
Loading…
Reference in New Issue