diff --git a/src/analyze/analyze-verify-util.c b/src/analyze/analyze-verify-util.c index f3ce0ad1f1..26d1130477 100644 --- a/src/analyze/analyze-verify-util.c +++ b/src/analyze/analyze-verify-util.c @@ -98,13 +98,13 @@ int verify_set_unit_path(char **filenames) { return r; } + if (strv_isempty(ans)) + return 0; + joined = strv_join(strv_uniq(ans), ":"); if (!joined) return -ENOMEM; - if (isempty(joined)) - return 0; - /* First, prepend our directories. Second, if some path was specified, use that, and * otherwise use the defaults. Any duplicates will be filtered out in path-lookup.c. * Treat explicit empty path to mean that nothing should be appended. */