mirror of
https://github.com/EnterpriseDB/repmgr.git
synced 2026-03-25 16:16:29 +00:00
In repmgrd there was the same problem that cause the segfault
This commit is contained in:
2
repmgr.c
2
repmgr.c
@@ -208,7 +208,7 @@ main(int argc, char **argv)
|
|||||||
|
|
||||||
if (config_file == NULL)
|
if (config_file == NULL)
|
||||||
{
|
{
|
||||||
config_file = malloc(10 + sizeof(CONFIG_FILE));
|
config_file = malloc(5 + sizeof(CONFIG_FILE));
|
||||||
sprintf(config_file, "./%s", CONFIG_FILE);
|
sprintf(config_file, "./%s", CONFIG_FILE);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -118,7 +118,10 @@ main(int argc, char **argv)
|
|||||||
setup_cancel_handler();
|
setup_cancel_handler();
|
||||||
|
|
||||||
if (config_file == NULL)
|
if (config_file == NULL)
|
||||||
|
{
|
||||||
|
config_file = malloc(5 + sizeof(CONFIG_FILE));
|
||||||
sprintf(config_file, "./%s", CONFIG_FILE);
|
sprintf(config_file, "./%s", CONFIG_FILE);
|
||||||
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Read the configuration file: repmgr.conf
|
* Read the configuration file: repmgr.conf
|
||||||
|
|||||||
Reference in New Issue
Block a user