summaryrefslogtreecommitdiff
path: root/src/resolve/resolved-conf.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/resolve/resolved-conf.c')
-rw-r--r--src/resolve/resolved-conf.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/src/resolve/resolved-conf.c b/src/resolve/resolved-conf.c
index ca69d70e3c..bffdf9f32d 100644
--- a/src/resolve/resolved-conf.c
+++ b/src/resolve/resolved-conf.c
@@ -337,10 +337,8 @@ int config_parse_dnssd_txt(const char *unit, const char *filename, unsigned line
r = split_pair(word, "=", &key, &value);
if (r == -ENOMEM)
return log_oom();
- if (r == -EINVAL) {
- key = word;
- word = NULL;
- }
+ if (r == -EINVAL)
+ key = TAKE_PTR(word);
if (!ascii_is_valid(key)) {
log_syntax(unit, LOG_ERR, filename, line, 0, "Invalid syntax, ignoring: %s", key);