]> git.ipfire.org Git - thirdparty/lxc.git/commitdiff
coverity: #1425789
authorChristian Brauner <christian.brauner@ubuntu.com>
Fri, 15 Jun 2018 11:35:09 +0000 (13:35 +0200)
committerChristian Brauner <christian.brauner@ubuntu.com>
Fri, 15 Jun 2018 11:47:20 +0000 (13:47 +0200)
Unchecked return value from library

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
src/lxc/lxccontainer.c

index 4dd12dda37c887c6c0263177e9cc180e95d1c5d4..f2a29acf86f0b251e804902f38fcca264b84f122 100644 (file)
@@ -2625,7 +2625,10 @@ static bool mod_rdep(struct lxc_container *c0, struct lxc_container *c, bool inc
                n = fscanf(f1, "%d", &v);
                fclose(f1);
                if (n == 1 && v == 0) {
-                       remove(path);
+                       ret = remove(path);
+                       if (ret < 0)
+                               ERROR("%s - Failed to remove \"%s\"",
+                                     strerror(errno), path);
                        n = 0;
                }
        }