diff options
author | Lennart Poettering <lennart@poettering.net> | 2014-07-31 19:53:59 +0200 |
---|---|---|
committer | Lennart Poettering <lennart@poettering.net> | 2014-07-31 19:53:59 +0200 |
commit | 7b9f7afcc04e80b77a2567b0750aa2cd03c1a1cd (patch) | |
tree | c1258c8cef335152021087e5aabf9c6208c20b0b /src/resolve/resolved-dns-domain.c | |
parent | 07bed172edc819cf85b72d5c67613511cbde5453 (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.c | 8 |
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; } |