path-util: do not return NULL as int
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 0b8cac8..e25e50e 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) {