提交 6c311f0d 编写于 作者: H Hongze Cheng

TD-353

上级 cd062fdb
...@@ -382,7 +382,7 @@ static void *tdDecodeStoreInfo(void *buf, SStoreInfo *pInfo) { ...@@ -382,7 +382,7 @@ static void *tdDecodeStoreInfo(void *buf, SStoreInfo *pInfo) {
} }
static SKVStore *tdNewKVStore(char *fname, iterFunc iFunc, afterFunc aFunc, void *appH) { static SKVStore *tdNewKVStore(char *fname, iterFunc iFunc, afterFunc aFunc, void *appH) {
SKVStore *pStore = (SKVStore *)malloc(sizeof(SKVStore)); SKVStore *pStore = (SKVStore *)calloc(1, sizeof(SKVStore));
if (pStore == NULL) goto _err; if (pStore == NULL) goto _err;
pStore->fname = strdup(fname); pStore->fname = strdup(fname);
...@@ -392,7 +392,9 @@ static SKVStore *tdNewKVStore(char *fname, iterFunc iFunc, afterFunc aFunc, void ...@@ -392,7 +392,9 @@ static SKVStore *tdNewKVStore(char *fname, iterFunc iFunc, afterFunc aFunc, void
} }
pStore->fsnap = tdGetKVStoreSnapshotFname(fname); pStore->fsnap = tdGetKVStoreSnapshotFname(fname);
if (pStore->fsnap == NULL) goto _err; if (pStore->fsnap == NULL) {
goto _err;
}
pStore->fnew = tdGetKVStoreNewFname(fname); pStore->fnew = tdGetKVStoreNewFname(fname);
if (pStore->fnew == NULL) goto _err; if (pStore->fnew == NULL) goto _err;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册