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