Merge pull request #2072 from taosdata/hotfix/sangshuduo/fix-resource-leak-in-mgmtTable.c
[TD-440] fix resource leak in mnodeTable.c
This commit is contained in:
commit
bb539dce42
|
@ -484,7 +484,10 @@ static int32_t mnodeSuperTableActionDecode(SSdbOper *pOper) {
|
||||||
if (pStable == NULL) return TSDB_CODE_SERV_OUT_OF_MEMORY;
|
if (pStable == NULL) return TSDB_CODE_SERV_OUT_OF_MEMORY;
|
||||||
|
|
||||||
int32_t len = strlen(pOper->rowData);
|
int32_t len = strlen(pOper->rowData);
|
||||||
if (len > TSDB_TABLE_ID_LEN) return TSDB_CODE_INVALID_TABLE_ID;
|
if (len > TSDB_TABLE_ID_LEN){
|
||||||
|
free(pStable);
|
||||||
|
return TSDB_CODE_INVALID_TABLE_ID;
|
||||||
|
}
|
||||||
pStable->info.tableId = strdup(pOper->rowData);
|
pStable->info.tableId = strdup(pOper->rowData);
|
||||||
len++;
|
len++;
|
||||||
|
|
||||||
|
@ -2369,4 +2372,4 @@ static int32_t mnodeRetrieveStreams(SShowObj *pShow, char *data, int32_t rows, v
|
||||||
mnodeDecDbRef(pDb);
|
mnodeDecDbRef(pDb);
|
||||||
|
|
||||||
return numOfRows;
|
return numOfRows;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue