mirror of
https://gitlab.com/chrony/chrony.git
synced 2025-12-03 17:35:06 -05:00
cmdparse: don't duplicate hostname in CPS_ParseNTPSourceAdd()
Let the caller duplicate the string if needed.
This commit is contained in:
2
client.c
2
client.c
@@ -971,11 +971,9 @@ process_cmd_add_server_or_peer(CMD_Request *msg, char *line)
|
||||
switch (status) {
|
||||
case CPS_Success:
|
||||
if (DNS_Name2IPAddress(data.name, &ip_addr) != DNS_Success) {
|
||||
free(data.name);
|
||||
fprintf(stderr, "Invalid host/IP address\n");
|
||||
break;
|
||||
}
|
||||
free(data.name);
|
||||
|
||||
if (data.params.min_stratum != SRC_DEFAULT_MINSTRATUM) {
|
||||
fprintf(stderr, "Option minstratum not supported\n");
|
||||
|
||||
Reference in New Issue
Block a user