]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
path-util: do not return NULL as int 1688/head
authorThomas Hindoe Paaboel Andersen <phomes@gmail.com>
Mon, 26 Oct 2015 21:26:49 +0000 (22:26 +0100)
committerThomas Hindoe Paaboel Andersen <phomes@gmail.com>
Mon, 26 Oct 2015 21:31:37 +0000 (22:31 +0100)
strv_split will only return NULL on oom so we should return -ENOMEM
instead.

Looks like an oversight from the changes in 0f474365

src/basic/path-util.c

index 0b8cac8f3e590c63b15f9a6722eabda1ed8d4dd2..e25e50e78a65313ec51140ab4e986c53adaf7091 100644 (file)
@@ -95,7 +95,7 @@ int path_split_and_make_absolute(const char *p, char ***ret) {
 
         l = strv_split(p, ":");
         if (!l)
-                return NULL;
+                return -ENOMEM;
 
         r = path_strv_make_absolute_cwd(l);
         if (r < 0) {