mirror of
https://github.com/systemd/systemd-stable.git
synced 2025-01-11 05:17:44 +03:00
network: clear previous assignment
Fixes oss-fuzz#13719.
This commit is contained in:
parent
75910ed9f4
commit
5f07d640ca
@ -758,12 +758,12 @@ int config_parse_wireguard_endpoint(const char *unit,
|
||||
++end;
|
||||
}
|
||||
|
||||
peer->endpoint_host = strndup(begin, len);
|
||||
if (!peer->endpoint_host)
|
||||
r = free_and_strndup(&peer->endpoint_host, begin, len);
|
||||
if (r < 0)
|
||||
return log_oom();
|
||||
|
||||
peer->endpoint_port = strdup(end);
|
||||
if (!peer->endpoint_port)
|
||||
r = free_and_strdup(&peer->endpoint_port, end);
|
||||
if (r < 0)
|
||||
return log_oom();
|
||||
|
||||
r = set_ensure_allocated(&w->peers_with_unresolved_endpoint, NULL);
|
||||
|
Loading…
Reference in New Issue
Block a user