[lttng-dev] [PATCH lttng-tools] Fix: put viewer stream on send error

Jérémie Galarneau jeremie.galarneau at efficios.com
Sat Sep 5 12:18:57 EDT 2015


Squashed into "Fix: Relay daemon ownership and reference counting".

Thanks!
Jérémie

On Fri, Sep 4, 2015 at 12:03 PM, Mathieu Desnoyers
<mathieu.desnoyers at efficios.com> wrote:
> Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers at efficios.com>
> ---
>  src/bin/lttng-relayd/live.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/src/bin/lttng-relayd/live.c b/src/bin/lttng-relayd/live.c
> index bcc4045..a1fbbbe 100644
> --- a/src/bin/lttng-relayd/live.c
> +++ b/src/bin/lttng-relayd/live.c
> @@ -243,10 +243,10 @@ ssize_t send_viewer_streams(struct lttcomm_sock *sock,
>                 pthread_mutex_unlock(&vstream->stream->lock);
>
>                 ret = send_response(sock, &send_stream, sizeof(send_stream));
> +               viewer_stream_put(vstream);
>                 if (ret < 0) {
>                         goto end_unlock;
>                 }
> -               viewer_stream_put(vstream);
>         }
>
>         ret = 0;
> --
> 2.1.4
>



-- 
Jérémie Galarneau
EfficiOS Inc.
http://www.efficios.com



More information about the lttng-dev mailing list