chiark / gitweb /
cgroup: when comparing agent paths, use path_equal()
authorLennart Poettering <lennart@poettering.net>
Thu, 3 Sep 2015 16:27:19 +0000 (18:27 +0200)
committerSven Eden <yamakuzure@gmx.net>
Tue, 14 Mar 2017 09:19:06 +0000 (10:19 +0100)
After all a path is a path is a path and we should use path_equal() to
comapre those.

src/basic/cgroup-util.c

index 8fbbd30..b9fd9a6 100644 (file)
@@ -842,7 +842,7 @@ int cg_install_release_agent(const char *controller, const char *agent) {
                 r = write_string_file_no_create(fs, agent);
                 if (r < 0)
                         return r;
-        } else if (!streq(sc, agent))
+        } else if (!path_equal(sc, agent))
                 return -EEXIST;
 
         fs = mfree(fs);