From: Jonathan Rajotte Date: Tue, 6 Jan 2015 15:59:47 +0000 (-0500) Subject: Fix: mi: snapshot: missing error handling for session name X-Git-Url: https://git.lttng.org./?a=commitdiff_plain;h=01defc26fedb2b8915df23f39cfa70d0d0036323;p=lttng-tools.git Fix: mi: snapshot: missing error handling for session name Signed-off-by: Jonathan Rajotte Signed-off-by: Jérémie Galarneau --- diff --git a/src/common/mi-lttng.c b/src/common/mi-lttng.c index 752bceceb..fed09854a 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);