From d88df895b4ed7f47253f4211807fde897ba5d7e4 Mon Sep 17 00:00:00 2001 From: hjxilinx Date: Sun, 5 Apr 2020 16:02:22 +0800 Subject: [PATCH] [TD-98] fix a valgrind warning of accessing uninitialised value. --- src/vnode/tsdb/src/tsdbMain.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/vnode/tsdb/src/tsdbMain.c b/src/vnode/tsdb/src/tsdbMain.c index 8ab7648510..dff5268dce 100644 --- a/src/vnode/tsdb/src/tsdbMain.c +++ b/src/vnode/tsdb/src/tsdbMain.c @@ -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; } -- GitLab