Signed-off-by: Jonathan Rajotte <[email protected]>
---
 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
[email protected]
http://lists.lttng.org/cgi-bin/mailman/listinfo/lttng-dev

Reply via email to