diff --git a/src/mnode/src/mgmtTable.c b/src/mnode/src/mgmtTable.c index 53fbd64f87e9c50fcb87deb15137c206412f1e35..f4c37a9b46ccfd1e7973638a545285f6bfd76907 100644 --- a/src/mnode/src/mgmtTable.c +++ b/src/mnode/src/mgmtTable.c @@ -233,7 +233,10 @@ static int32_t mgmtChildTableActionDecode(SSdbOper *pOper) { if (pTable == 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(pTable); + return TSDB_CODE_INVALID_TABLE_ID; + } pTable->info.tableId = strdup(pOper->rowData); len++;