projects
/
lttng-tools.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
Fix: utils: unhandled close return value
[lttng-tools.git]
/
src
/
common
/
utils.c
diff --git
a/src/common/utils.c
b/src/common/utils.c
index 7aed4442b5a635d6ba731ad6f2f8fc6224ae7643..8b2e0063c28d8bbc5570dc319c9121ea04d8af44 100644
(file)
--- a/
src/common/utils.c
+++ b/
src/common/utils.c
@@
-240,7
+240,10
@@
int utils_create_pid_file(pid_t pid, const char *filepath)
if (fp == NULL) {
PERROR("fdopen file %s", filepath);
ret = -1;
- close(fd);
+ if (close(fd)) {
+ PERROR("Failed to close `%s` file descriptor while handling fdopen error", filepath);
+ }
+
goto error;
}
This page took
0.023938 seconds
and
4
git commands to generate.