提交 df288e77 编写于 作者: H Hongze Cheng

fix sync memory leak

上级 b0c9fc32
...@@ -249,7 +249,11 @@ uint32_t tsdbGetFileInfo(TSDB_REPO_T *repo, char *name, uint32_t *index, uint32_ ...@@ -249,7 +249,11 @@ uint32_t tsdbGetFileInfo(TSDB_REPO_T *repo, char *name, uint32_t *index, uint32_
} else { // get the named file at the specified index. If not there, return 0 } else { // get the named file at the specified index. If not there, return 0
fname = malloc(prefixLen + strlen(name) + 2); fname = malloc(prefixLen + strlen(name) + 2);
sprintf(fname, "%s/%s", prefix, name); sprintf(fname, "%s/%s", prefix, name);
if (access(fname, F_OK) != 0) return 0; if (access(fname, F_OK) != 0) {
taosFree(fname);
taosFree(sdup)
return 0;
}
if (*index == TSDB_META_FILE_INDEX) { // get meta file if (*index == TSDB_META_FILE_INDEX) { // get meta file
tsdbGetStoreInfo(fname, &magic, size); tsdbGetStoreInfo(fname, &magic, size);
} else { } else {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册