提交 3ef5b844 编写于 作者: S Shuduo Sang

[TD-440] fix resource leak in mnodeTable.c

上级 6a7da09d
......@@ -484,7 +484,10 @@ static int32_t mnodeSuperTableActionDecode(SSdbOper *pOper) {
if (pStable == NULL) return TSDB_CODE_SERV_OUT_OF_MEMORY;
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);
len++;
......@@ -2369,4 +2372,4 @@ static int32_t mnodeRetrieveStreams(SShowObj *pShow, char *data, int32_t rows, v
mnodeDecDbRef(pDb);
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.
先完成此消息的编辑!
想要评论请 注册