mirror of
https://github.com/EnterpriseDB/repmgr.git
synced 2026-03-27 00:46:29 +00:00
I was having a segmentation fault because i was using a pointer to char
but never indicated a size for the compiler to reserve... malloc() solves my problem
This commit is contained in:
3
repmgr.c
3
repmgr.c
@@ -207,7 +207,10 @@ main(int argc, char **argv)
|
|||||||
exit(1);
|
exit(1);
|
||||||
|
|
||||||
if (config_file == NULL)
|
if (config_file == NULL)
|
||||||
|
{
|
||||||
|
config_file = malloc(10 + sizeof(CONFIG_FILE));
|
||||||
sprintf(config_file, "./%s", CONFIG_FILE);
|
sprintf(config_file, "./%s", CONFIG_FILE);
|
||||||
|
}
|
||||||
|
|
||||||
if (dbname == NULL)
|
if (dbname == NULL)
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user