projects
/
lttng-tools.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
Fix: out_fd can be uninitialized.
[lttng-tools.git]
/
src
/
common
/
consumer
/
consumer.c
diff --git
a/src/common/consumer/consumer.c
b/src/common/consumer/consumer.c
index d46fc30a9f0817c48032e9ad69e5e07ec2f01843..5a87e18960921bae1bddac92bfe2393944f15244 100644
(file)
--- a/
src/common/consumer/consumer.c
+++ b/
src/common/consumer/consumer.c
@@
-3886,6
+3886,11
@@
int consumer_clear_stream_files(struct lttng_consumer_stream *stream)
return LTTCOMM_CONSUMERD_SUCCESS;
}
+ /* Stream might not have out_fd set. Snapshot stream for example. */
+ if (stream->out_fd < 0) {
+ return LTTCOMM_CONSUMERD_SUCCESS;
+ }
+
ret = close(stream->out_fd);
if (ret < 0) {
PERROR("Closing tracefile");
This page took
0.025418 seconds
and
5
git commands to generate.