summaryrefslogtreecommitdiffstats
path: root/src/resolve/resolved-dnssd.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/resolve/resolved-dnssd.c')
-rw-r--r--src/resolve/resolved-dnssd.c8
1 files changed, 1 insertions, 7 deletions
diff --git a/src/resolve/resolved-dnssd.c b/src/resolve/resolved-dnssd.c
index 404c290eec..8790755d3b 100644
--- a/src/resolve/resolved-dnssd.c
+++ b/src/resolve/resolved-dnssd.c
@@ -140,16 +140,10 @@ static int dnssd_service_load(Manager *manager, const char *filename) {
static int specifier_dnssd_hostname(char specifier, const void *data, const char *root, const void *userdata, char **ret) {
const Manager *m = ASSERT_PTR(userdata);
- char *n;
assert(m->llmnr_hostname);
- n = strdup(m->llmnr_hostname);
- if (!n)
- return -ENOMEM;
-
- *ret = n;
- return 0;
+ return strdup_to(ret, m->llmnr_hostname);
}
int dnssd_render_instance_name(Manager *m, DnssdService *s, char **ret) {