chiark / gitweb /
mount-setup: /selinux, /cgroup, /dev/cgroup are sooo old, don't bother with them...
[elogind.git] / src / core / load-fragment.c
index eea415883b53ada8ccd0456c8ff90719c71321e0..516731aba26cf8497ec0d296d4693df1a2ec2e1e 100644 (file)
@@ -589,7 +589,8 @@ int config_parse_exec(const char *unit,
                 }
 
         found:
-                n = new(char*, k + !separate_argv0);
+                /* If seperate_argv0, we'll move first element to path variable */
+                n = new(char*, MAX(k + !separate_argv0, 1u));
                 if (!n)
                         return log_oom();
 
@@ -2297,7 +2298,7 @@ int config_parse_documentation(const char *unit,
 
         for (a = b = u->documentation; a && *a; a++) {
 
-                if (is_valid_documentation_url(*a))
+                if (documentation_url_is_valid(*a))
                         *(b++) = *a;
                 else {
                         log_syntax(unit, LOG_ERR, filename, line, EINVAL,