]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
cgroup: fix potential access of uninitialized variable
authorLennart Poettering <lennart@poettering.net>
Thu, 3 Sep 2015 17:46:23 +0000 (19:46 +0200)
committerLennart Poettering <lennart@poettering.net>
Fri, 4 Sep 2015 07:07:31 +0000 (09:07 +0200)
src/basic/cgroup-util.c

index 812308e2437a91c702e645f51809c6f97682c1a7..fe8750d0f38463e589b730bfbfaac511d6a1fa4e 100644 (file)
@@ -1910,7 +1910,7 @@ int cg_attach_many_everywhere(CGroupMask supported, const char *path, Set* pids,
 
 int cg_migrate_everywhere(CGroupMask supported, const char *from, const char *to, cg_migrate_callback_t to_callback, void *userdata) {
         CGroupController c;
-        int r, unified;
+        int r = 0, unified;
 
         if (!path_equal(from, to))  {
                 r = cg_migrate_recursive(SYSTEMD_CGROUP_CONTROLLER, from, SYSTEMD_CGROUP_CONTROLLER, to, false, true);