[lttng-dev] [PATCH lttng-tools stable-2.2] Fix: possible double-close on stream out_fd
David Goulet
dgoulet at efficios.com
Fri Jul 5 11:11:32 EDT 2013
Merged
Mathieu Desnoyers:
> Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers at efficios.com>
> ---
> diff --git a/src/common/kernel-consumer/kernel-consumer.c b/src/common/kernel-consumer/kernel-consumer.c
> index fc86965..06801b9 100644
> --- a/src/common/kernel-consumer/kernel-consumer.c
> +++ b/src/common/kernel-consumer/kernel-consumer.c
> @@ -582,11 +582,12 @@ int lttng_kconsumer_on_recv_stream(struct lttng_consumer_stream *stream)
> return 0;
>
> error_close_fd:
> - {
> + if (stream->out_fd >= 0) {
> int err;
>
> err = close(stream->out_fd);
> assert(!err);
> + stream->out_fd = -1;
> }
> error:
> return ret;
>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 490 bytes
Desc: OpenPGP digital signature
URL: <http://lists.lttng.org/pipermail/lttng-dev/attachments/20130705/d59f4285/attachment.pgp>
More information about the lttng-dev
mailing list