提交 d2c852c8 编写于 作者: S Shengliang Guan

TD-1762

上级 9b7f04b0
...@@ -127,6 +127,7 @@ PARSE_CFG_OVER: ...@@ -127,6 +127,7 @@ PARSE_CFG_OVER:
if (content != NULL) free(content); if (content != NULL) free(content);
if (root != NULL) cJSON_Delete(root); if (root != NULL) cJSON_Delete(root);
if (fp != NULL) fclose(fp); if (fp != NULL) fclose(fp);
terrno = 0;
dnodeResetCfg(&cfg); dnodeResetCfg(&cfg);
return 0; return 0;
...@@ -155,6 +156,7 @@ static int32_t dnodeWriteCfg() { ...@@ -155,6 +156,7 @@ static int32_t dnodeWriteCfg() {
fflush(fp); fflush(fp);
fclose(fp); fclose(fp);
free(content); free(content);
terrno = 0;
dInfo("successed to write %s", file); dInfo("successed to write %s", file);
return 0; return 0;
......
...@@ -235,6 +235,7 @@ PRASE_EPS_OVER: ...@@ -235,6 +235,7 @@ PRASE_EPS_OVER:
dnodeResetEps(eps); dnodeResetEps(eps);
if (eps) free(eps); if (eps) free(eps);
terrno = 0;
return 0; return 0;
} }
...@@ -272,6 +273,7 @@ static int32_t dnodeWriteEps() { ...@@ -272,6 +273,7 @@ static int32_t dnodeWriteEps() {
fflush(fp); fflush(fp);
fclose(fp); fclose(fp);
free(content); free(content);
terrno = 0;
dInfo("successed to write %s", file); dInfo("successed to write %s", file);
return 0; return 0;
......
...@@ -238,6 +238,7 @@ PARSE_MINFOS_OVER: ...@@ -238,6 +238,7 @@ PARSE_MINFOS_OVER:
if (content != NULL) free(content); if (content != NULL) free(content);
if (root != NULL) cJSON_Delete(root); if (root != NULL) cJSON_Delete(root);
if (fp != NULL) fclose(fp); if (fp != NULL) fclose(fp);
terrno = 0;
dnodeResetMInfos(&minfos); dnodeResetMInfos(&minfos);
return 0; return 0;
...@@ -276,6 +277,7 @@ static int32_t dnodeWriteMInfos() { ...@@ -276,6 +277,7 @@ static int32_t dnodeWriteMInfos() {
fflush(fp); fflush(fp);
fclose(fp); fclose(fp);
free(content); free(content);
terrno = 0;
dInfo("successed to write %s", file); dInfo("successed to write %s", file);
return 0; return 0;
......
...@@ -262,6 +262,7 @@ PARSE_VCFG_ERROR: ...@@ -262,6 +262,7 @@ PARSE_VCFG_ERROR:
vnodeLoadCfg(pVnode, &vnodeMsg); vnodeLoadCfg(pVnode, &vnodeMsg);
} }
terrno = 0;
return ret; return ret;
} }
...@@ -316,6 +317,7 @@ int32_t vnodeWriteCfg(SMDCreateVnodeMsg *pMsg) { ...@@ -316,6 +317,7 @@ int32_t vnodeWriteCfg(SMDCreateVnodeMsg *pMsg) {
fflush(fp); fflush(fp);
fclose(fp); fclose(fp);
free(content); free(content);
terrno = 0;
vInfo("vgId:%d, successed to write %s", pMsg->cfg.vgId, file); vInfo("vgId:%d, successed to write %s", pMsg->cfg.vgId, file);
return TSDB_CODE_SUCCESS; return TSDB_CODE_SUCCESS;
......
...@@ -70,6 +70,7 @@ PARSE_VER_ERROR: ...@@ -70,6 +70,7 @@ PARSE_VER_ERROR:
if (content != NULL) free(content); if (content != NULL) free(content);
if (root != NULL) cJSON_Delete(root); if (root != NULL) cJSON_Delete(root);
if (fp != NULL) fclose(fp); if (fp != NULL) fclose(fp);
terrno = 0;
return ret; return ret;
} }
...@@ -96,6 +97,7 @@ int32_t vnodeSaveVersion(SVnodeObj *pVnode) { ...@@ -96,6 +97,7 @@ int32_t vnodeSaveVersion(SVnodeObj *pVnode) {
fflush(fp); fflush(fp);
fclose(fp); fclose(fp);
free(content); free(content);
terrno = 0;
vInfo("vgId:%d, successed to write %s, version:%" PRId64, pVnode->vgId, file, pVnode->fversion); vInfo("vgId:%d, successed to write %s, version:%" PRId64, pVnode->vgId, file, pVnode->fversion);
return TSDB_CODE_SUCCESS; return TSDB_CODE_SUCCESS;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册