diff options
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; } |