summaryrefslogtreecommitdiff
path: root/src/resolve/resolved-dns-domain.c
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2014-07-31 19:53:59 +0200
committerLennart Poettering <lennart@poettering.net>2014-07-31 19:53:59 +0200
commit7b9f7afcc04e80b77a2567b0750aa2cd03c1a1cd (patch)
treec1258c8cef335152021087e5aabf9c6208c20b0b /src/resolve/resolved-dns-domain.c
parent07bed172edc819cf85b72d5c67613511cbde5453 (diff)
resolved: accept UTF-8 hostnames from bus clients
Diffstat (limited to 'src/resolve/resolved-dns-domain.c')
-rw-r--r--src/resolve/resolved-dns-domain.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/resolve/resolved-dns-domain.c b/src/resolve/resolved-dns-domain.c
index c2a435944c..1bb011d9e7 100644
--- a/src/resolve/resolved-dns-domain.c
+++ b/src/resolve/resolved-dns-domain.c
@@ -172,7 +172,6 @@ int dns_name_normalize(const char *s, char **_ret) {
int r;
assert(s);
- assert(_ret);
for (;;) {
_cleanup_free_ char *t = NULL;
@@ -210,8 +209,11 @@ int dns_name_normalize(const char *s, char **_ret) {
return -ENOMEM;
ret[n] = 0;
- *_ret = ret;
- ret = NULL;
+
+ if (_ret) {
+ *_ret = ret;
+ ret = NULL;
+ }
return 0;
}