fix memleak issue
This commit is contained in:
parent
77e3675640
commit
5e82ec5988
|
@ -439,6 +439,8 @@ void tscFreeSqlResult(SSqlObj *pSql);
|
||||||
* @param pObj
|
* @param pObj
|
||||||
*/
|
*/
|
||||||
void tscFreeSqlObj(SSqlObj *pSql);
|
void tscFreeSqlObj(SSqlObj *pSql);
|
||||||
|
void tscFreeSubobj(SSqlObj* pSql);
|
||||||
|
|
||||||
void tscFreeRegisteredSqlObj(void *pSql);
|
void tscFreeRegisteredSqlObj(void *pSql);
|
||||||
|
|
||||||
void tscCloseTscObj(void *pObj);
|
void tscCloseTscObj(void *pObj);
|
||||||
|
|
|
@ -299,6 +299,7 @@ static void tscProcessStreamRetrieveResult(void *param, TAOS_RES *res, int numOf
|
||||||
tfree(pTableMetaInfo->pTableMeta);
|
tfree(pTableMetaInfo->pTableMeta);
|
||||||
|
|
||||||
tscFreeSqlResult(pSql);
|
tscFreeSqlResult(pSql);
|
||||||
|
tscFreeSubobj(pSql);
|
||||||
tfree(pSql->pSubs);
|
tfree(pSql->pSubs);
|
||||||
pSql->subState.numOfSub = 0;
|
pSql->subState.numOfSub = 0;
|
||||||
pTableMetaInfo->vgroupList = tscVgroupInfoClear(pTableMetaInfo->vgroupList);
|
pTableMetaInfo->vgroupList = tscVgroupInfoClear(pTableMetaInfo->vgroupList);
|
||||||
|
|
|
@ -447,7 +447,7 @@ void tscFreeSqlResult(SSqlObj* pSql) {
|
||||||
memset(&pSql->res, 0, sizeof(SSqlRes));
|
memset(&pSql->res, 0, sizeof(SSqlRes));
|
||||||
}
|
}
|
||||||
|
|
||||||
static void tscFreeSubobj(SSqlObj* pSql) {
|
void tscFreeSubobj(SSqlObj* pSql) {
|
||||||
if (pSql->subState.numOfSub == 0) {
|
if (pSql->subState.numOfSub == 0) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue