diff --git a/src/tsdb/src/tsdbCompact.c b/src/tsdb/src/tsdbCompact.c index 6415c9a649ec08e4db442a321565e15e5df2e4a7..3b5e8ce56dab297c5b6cc4a9b07d8150445917b9 100644 --- a/src/tsdb/src/tsdbCompact.c +++ b/src/tsdb/src/tsdbCompact.c @@ -441,6 +441,7 @@ static int tsdbCompactMeta(STsdbRepo *pRepo) { if ((tdInitDataCols(pComph->pDataCols, pSchema) < 0) || (tdInitDataCols(pReadh->pDCols[0], pSchema) < 0) || (tdInitDataCols(pReadh->pDCols[1], pSchema) < 0)) { terrno = TSDB_CODE_TDB_OUT_OF_MEMORY; + tdFreeSchema(pSchema); return -1; } tdFreeSchema(pSchema);