[lttng-dev] [PATCH lttng-tools 1/1] Fix: uninitialized return value on error path

Jérémie Galarneau jeremie.galarneau at efficios.com
Thu Aug 3 16:15:39 UTC 2017


Merged in master, stable-2.10, stable-2.9 and stable-2.8.

Thanks!
Jérémie

On 2 August 2017 at 11:34, Mathieu Desnoyers
<mathieu.desnoyers at efficios.com> wrote:
> Found by Coverity:
>
> *** CID 1378810:  Uninitialized variables  (UNINIT)
> /src/bin/lttng-sessiond/context.c: 73 in add_kctx_all_channels()
>
> Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers at efficios.com>
> ---
>  src/bin/lttng-sessiond/context.c | 1 +
>  1 file changed, 1 insertion(+)
>
> diff --git a/src/bin/lttng-sessiond/context.c b/src/bin/lttng-sessiond/context.c
> index a2f02288..1e68bd8b 100644
> --- a/src/bin/lttng-sessiond/context.c
> +++ b/src/bin/lttng-sessiond/context.c
> @@ -55,6 +55,7 @@ static int add_kctx_all_channels(struct ltt_kernel_session *ksession,
>                 kctx_copy = trace_kernel_copy_context(kctx);
>                 if (!kctx_copy) {
>                         PERROR("zmalloc ltt_kernel_context");
> +                       ret = -ENOMEM;
>                         goto error;
>                 }
>
> --
> 2.11.0
>



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


More information about the lttng-dev mailing list