projects
/
lttng-ust.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Fix: FD leak in liblttng-ust-ctl
[lttng-ust.git]
/
liblttng-ust-ctl
/
ustctl.c
diff --git
a/liblttng-ust-ctl/ustctl.c
b/liblttng-ust-ctl/ustctl.c
index 00d9802ee300a1dfc391e08d3f3e9f1cba0e398f..bc3ea9b12266531be1a5b1d7f760b06192ff93d9 100644
(file)
--- a/
liblttng-ust-ctl/ustctl.c
+++ b/
liblttng-ust-ctl/ustctl.c
@@
-1012,6
+1012,8
@@
chan_error:
void ustctl_destroy_channel(struct ustctl_consumer_channel *chan)
{
void ustctl_destroy_channel(struct ustctl_consumer_channel *chan)
{
+ (void) ustctl_channel_close_wait_fd(chan);
+ (void) ustctl_channel_close_wakeup_fd(chan);
chan->chan->ops->channel_destroy(chan->chan);
free(chan);
}
chan->chan->ops->channel_destroy(chan->chan);
free(chan);
}
@@
-1220,6
+1222,8
@@
void ustctl_destroy_stream(struct ustctl_consumer_stream *stream)
assert(stream);
buf = stream->buf;
consumer_chan = stream->chan;
assert(stream);
buf = stream->buf;
consumer_chan = stream->chan;
+ (void) ustctl_stream_close_wait_fd(stream);
+ (void) ustctl_stream_close_wakeup_fd(stream);
lib_ring_buffer_release_read(buf, consumer_chan->chan->handle);
free(stream);
}
lib_ring_buffer_release_read(buf, consumer_chan->chan->handle);
free(stream);
}
This page took
0.02335 seconds
and
4
git commands to generate.