未验证 提交 bb539dce 编写于 作者: S Shengliang Guan 提交者: GitHub

Merge pull request #2072 from taosdata/hotfix/sangshuduo/fix-resource-leak-in-mgmtTable.c

[TD-440] fix resource leak in mnodeTable.c
...@@ -484,7 +484,10 @@ static int32_t mnodeSuperTableActionDecode(SSdbOper *pOper) { ...@@ -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 ...@@ -2369,4 +2372,4 @@ static int32_t mnodeRetrieveStreams(SShowObj *pShow, char *data, int32_t rows, v
mnodeDecDbRef(pDb); mnodeDecDbRef(pDb);
return numOfRows; return numOfRows;
} }
\ No newline at end of file
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册