mirror of
https://github.com/EnterpriseDB/repmgr.git
synced 2026-03-22 22:56:29 +00:00
Don't try and copy a NULL pointer
This commit is contained in:
@@ -131,7 +131,10 @@ do_master_register(void)
|
||||
/* update node record structure with settings from config file */
|
||||
strncpy(node_info.node_name, config_file_options.node_name, MAXLEN);
|
||||
strncpy(node_info.conninfo, config_file_options.conninfo, MAXLEN);
|
||||
strncpy(node_info.slot_name, repmgr_slot_name_ptr, MAXLEN);
|
||||
|
||||
if (repmgr_slot_name_ptr != NULL)
|
||||
strncpy(node_info.slot_name, repmgr_slot_name_ptr, MAXLEN);
|
||||
|
||||
node_info.priority = config_file_options.priority;
|
||||
|
||||
initPQExpBuffer(&event_description);
|
||||
@@ -168,7 +171,6 @@ do_master_register(void)
|
||||
|
||||
}
|
||||
|
||||
|
||||
/* Log the event */
|
||||
create_event_record(conn,
|
||||
&config_file_options,
|
||||
|
||||
Reference in New Issue
Block a user