From: Jérémie Galarneau Date: Wed, 26 Nov 2014 23:02:22 +0000 (-0500) Subject: Cleanup: Unchecked close() return value in utils_create_lock_file() X-Git-Url: https://git.lttng.org/?p=lttng-tools.git;a=commitdiff_plain;h=ffb0b851ac47de854df910d226dfd150b32e8bfe Cleanup: Unchecked close() return value in utils_create_lock_file() *** CID 1226188: Unchecked return value (CHECKED_RETURN) Signed-off-by: Jérémie Galarneau --- diff --git a/src/common/utils.c b/src/common/utils.c index 365510b3c..e7dccb7b7 100644 --- a/src/common/utils.c +++ b/src/common/utils.c @@ -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; }