diff --git a/src/util/src/tkvstore.c b/src/util/src/tkvstore.c index fb4ea2146fe74203da0ebb09ee8df2eb501e3ed5..41632d5b2bc7c5cbe89fc0bb22f8b53b1be26601 100644 --- a/src/util/src/tkvstore.c +++ b/src/util/src/tkvstore.c @@ -386,7 +386,7 @@ static SKVStore *tdNewKVStore(char *fname, iterFunc iFunc, afterFunc aFunc, void if (pStore == NULL) goto _err; pStore->fname = strdup(fname); - if (pStore->map == NULL) { + if (pStore->fname == NULL) { terrno = TSDB_CODE_COM_OUT_OF_MEMORY; goto _err; }