]> git.ipfire.org Git - pakfire.git/commitdiff
cgroup: Initialize return value in case there are no children
authorMichael Tremer <michael.tremer@ipfire.org>
Mon, 27 Jan 2025 16:53:18 +0000 (16:53 +0000)
committerMichael Tremer <michael.tremer@ipfire.org>
Mon, 27 Jan 2025 16:53:18 +0000 (16:53 +0000)
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
src/pakfire/cgroup.c

index a498c55410a4a04b2d40b29e0a07d6e1d5d6e9d0..5531bd98a833479e89112efd3091f38badffdbcb 100644 (file)
@@ -531,7 +531,7 @@ static int pakfire_cgroup_destroy_children(struct pakfire_cgroup* cgroup, int fl
        struct pakfire_cgroup* child = NULL;
        struct dirent* entry = NULL;
        DIR* dir = NULL;
-       int r;
+       int r = 0;
 
        // Open the directory
        dir = fdopendir(cgroup->fd);