From ff065ec13c59f8921a39bf42174cc7a17b26d332 Mon Sep 17 00:00:00 2001 From: chenzhikai <895543892@qq.com> Date: Mon, 24 Jul 2023 20:27:33 +0800 Subject: [PATCH] =?UTF-8?q?=E8=A7=A3=E5=86=B3gs=5Fctl=E5=86=85=E5=AD=98?= =?UTF-8?q?=E6=B3=84=E6=BC=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/bin/pg_ctl/pg_ctl.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/bin/pg_ctl/pg_ctl.cpp b/src/bin/pg_ctl/pg_ctl.cpp index 42ecb29f2c..e2c8f9a5b4 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; } -- Gitee