diff --git a/src/bin/pg_ctl/pg_ctl.cpp b/src/bin/pg_ctl/pg_ctl.cpp index 9c1675d74..1a2995480 100755 --- a/src/bin/pg_ctl/pg_ctl.cpp +++ b/src/bin/pg_ctl/pg_ctl.cpp @@ -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; }