diff --git a/src/bin/pg_ctl/pg_ctl.cpp b/src/bin/pg_ctl/pg_ctl.cpp index 42ecb29f2cb6d0168671a97b2939387e8e1d6edf..e2c8f9a5b4fd9d61af5c5a2094fbb06398838338 100755 --- a/src/bin/pg_ctl/pg_ctl.cpp +++ b/src/bin/pg_ctl/pg_ctl.cpp @@ -7331,6 +7331,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) @@ -7457,7 +7459,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; }