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-Tag: v2.6.0~27 X-Git-Url: https://git.lttng.org./?a=commitdiff_plain;h=f10b841138d1b23ad3b18ad264e52c2d7aaaf4fb;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 c21ed5a63..bb1a66c94 100644 --- a/src/common/mi-lttng.c +++ b/src/common/mi-lttng.c @@ -1314,6 +1314,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);