Merge pull request #15193 from taosdata/fix/TD-17511

fix(query): fix memory leak in histogram param validation
This commit is contained in:
Ganlin Zhao 2022-07-20 17:03:02 +08:00 committed by GitHub
commit 97d8f64d84
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 0 deletions

View File

@ -958,6 +958,7 @@ static bool validateHistogramBinDesc(char* binDescStr, int8_t binType, char* err
return false;
}
cJSON_Delete(binDesc);
taosMemoryFree(intervals);
return true;
}

View File

@ -2750,6 +2750,7 @@ static bool getHistogramBinDesc(SHistoFuncBin** bins, int32_t* binNum, char* bin
(*bins)[i].count = 0;
}
cJSON_Delete(binDesc);
taosMemoryFree(intervals);
return true;
}