!3815 解决gs_ctl内存泄漏

Merge pull request !3815 from Carl/fixfix
This commit is contained in:
opengauss_bot
2023-07-25 01:49:44 +00:00
committed by Gitee

View File

@ -7341,6 +7341,8 @@ static void free_ctl()
FREE_AND_RESET(register_password);
FREE_AND_RESET(pgha_str);
FREE_AND_RESET(pgha_opt);
FREE_AND_RESET(ss_instance_config.dss.vgname);
FREE_AND_RESET(ss_instance_config.dss.vgdata);
}
static int get_instance_id(void)
@ -7467,7 +7469,9 @@ bool ss_read_config(void)
(void)find_guc_optval((const char**)optlines, "ss_enable_dss", enable_dss);
/* this is not enable_dss, wo do not need to do anythiny else */
if(strncmp(enable_dss, "on", sizeof("on")) != 0) {
if(strcmp(enable_dss, "on") != 0) {
freefile(optlines);
optlines = NULL;
return false;
}