[TD-98] fix a valgrind warning of accessing uninitialised value.

This commit is contained in:
hjxilinx 2020-04-05 16:02:22 +08:00
parent 2e06575ad9
commit d88df895b4
1 changed files with 1 additions and 1 deletions

View File

@ -210,7 +210,7 @@ tsdb_repo_t *tsdbOpenRepo(char *tsdbDir) {
return NULL;
}
STsdbRepo *pRepo = (STsdbRepo *)malloc(sizeof(STsdbRepo));
STsdbRepo *pRepo = (STsdbRepo *)calloc(1, sizeof(STsdbRepo));
if (pRepo == NULL) {
return NULL;
}