mirror of
https://github.com/systemd/systemd.git
synced 2025-03-19 22:50:17 +03:00
resolved: fix minor memory leak
Coverity 1446992
This commit is contained in:
parent
e94a009c10
commit
999c248629
@ -548,7 +548,13 @@ static int manager_watch_hostname(Manager *m) {
|
||||
|
||||
r = determine_hostname(&m->full_hostname, &m->llmnr_hostname, &m->mdns_hostname);
|
||||
if (r < 0) {
|
||||
log_info("Defaulting to hostname '%s'.", fallback_hostname());
|
||||
_cleanup_free_ char *d = NULL;
|
||||
|
||||
d = fallback_hostname();
|
||||
if (!d)
|
||||
return log_oom();
|
||||
|
||||
log_info("Defaulting to hostname '%s'.", d);
|
||||
|
||||
r = make_fallback_hostnames(&m->full_hostname, &m->llmnr_hostname, &m->mdns_hostname);
|
||||
if (r < 0)
|
||||
|
Loading…
x
Reference in New Issue
Block a user