projects
/
babeltrace.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
Fix: Check stream fd value before closing
[babeltrace.git]
/
formats
/
ctf
/
ir
/
stream.c
diff --git
a/formats/ctf/ir/stream.c
b/formats/ctf/ir/stream.c
index 70e2ec2a0ab0218d4190955e09a3ceb67dbb3709..858cd98b02865ef25266111fe3d14b8e224ed107 100644
(file)
--- a/
formats/ctf/ir/stream.c
+++ b/
formats/ctf/ir/stream.c
@@
-913,7
+913,7
@@
void bt_ctf_stream_destroy(struct bt_ctf_ref *ref)
stream = container_of(ref, struct bt_ctf_stream, ref_count);
ctf_fini_pos(&stream->pos);
- if (close(stream->pos.fd)) {
+ if (
stream->pos.fd >= 0 &&
close(stream->pos.fd)) {
perror("close");
}
This page took
0.032189 seconds
and
4
git commands to generate.