[lttng-dev] [PATCH] Fix: mi: snapshot: missing error handling for session name

Jérémie Galarneau jeremie.galarneau at efficios.com
Thu Jan 8 14:52:00 EST 2015


Merged in master and stable-2.6.

Thanks!
Jérémie

On Tue, Jan 6, 2015 at 10:59 AM, Jonathan Rajotte
<jonathan.rajotte-julien at efficios.com> wrote:
> Signed-off-by: Jonathan Rajotte <jonathan.rajotte-julien at efficios.com>
> ---
>  src/common/mi-lttng.c | 3 +++
>  1 file changed, 3 insertions(+)
>
> diff --git a/src/common/mi-lttng.c b/src/common/mi-lttng.c
> index 752bcec..fed0985 100644
> --- a/src/common/mi-lttng.c
> +++ b/src/common/mi-lttng.c
> @@ -1341,6 +1341,9 @@ int mi_lttng_snapshot_output_session_name(struct mi_writer *writer,
>         /* Snapshot output list for current session name */
>         ret = mi_lttng_writer_write_element_string(writer, config_element_name,
>                         session_name);
> +       if (ret) {
> +               goto end;
> +       }
>
>         /* Open element snapshots (sequence one snapshot) */
>         ret = mi_lttng_writer_open_element(writer, mi_lttng_element_snapshots);
> --
> 1.9.1
>
>
> _______________________________________________
> lttng-dev mailing list
> lttng-dev at lists.lttng.org
> http://lists.lttng.org/cgi-bin/mailman/listinfo/lttng-dev



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



More information about the lttng-dev mailing list