Cleanup: Unchecked close() return value in utils_create_lock_file()
authorJérémie Galarneau <jeremie.galarneau@efficios.com>
Wed, 26 Nov 2014 23:02:22 +0000 (18:02 -0500)
committerJérémie Galarneau <jeremie.galarneau@efficios.com>
Wed, 26 Nov 2014 23:02:22 +0000 (18:02 -0500)
*** CID 1226188:  Unchecked return value  (CHECKED_RETURN)

Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
src/common/utils.c

index 365510b3c37de51bacdeafee888b7f87e9776ac5..e7dccb7b7490cb1c1392461304e70ea7cbf5d390 100644 (file)
@@ -514,7 +514,9 @@ int utils_create_lock_file(const char *filepath)
        if (ret) {
                WARN("Could not get lock file %s, another instance is running.",
                        filepath);
-               close(fd);
+               if (close(fd)) {
+                       PERROR("close lock file");
+               }
                fd = ret;
                goto error;
        }
This page took 0.027237 seconds and 4 git commands to generate.