diff --git a/src/client/src/tscParseLineProtocol.c b/src/client/src/tscParseLineProtocol.c index 8f9cdbf002d0f873a6c66018b1e2a41dd02fe82a..7645a30eee59c3fbcc58f07877622c91fc3c2bde 100644 --- a/src/client/src/tscParseLineProtocol.c +++ b/src/client/src/tscParseLineProtocol.c @@ -518,7 +518,11 @@ static int32_t modifyDBSchemas(TAOS* taos, SArray* stableSchemas) { bool actionNeeded = false; generateSchemaAction(pointTag, dbTagHash, dbSchema.tags, true, pointSchema->sTableName, &schemaAction, &actionNeeded); if (actionNeeded) { - applySchemaAction(taos, &schemaAction); + code = applySchemaAction(taos, &schemaAction); + if (code != 0) { + destroySmlSTableSchema(&dbSchema); + return code; + } } } @@ -532,7 +536,11 @@ static int32_t modifyDBSchemas(TAOS* taos, SArray* stableSchemas) { bool actionNeeded = false; generateSchemaAction(pointCol, dbFieldHash, dbSchema.fields,false, pointSchema->sTableName, &schemaAction, &actionNeeded); if (actionNeeded) { - applySchemaAction(taos, &schemaAction); + code = applySchemaAction(taos, &schemaAction); + if (code != 0) { + destroySmlSTableSchema(&dbSchema); + return code; + } } }