X-Git-Url: https://git.lttng.org/?a=blobdiff_plain;f=src%2Fcommon%2Fmi-lttng.c;h=fed09854a206012482d320b770f666ed9b3cdb53;hb=01defc26fedb2b8915df23f39cfa70d0d0036323;hp=752bcecebd9fc48f7558651395a59b56750c868b;hpb=c4b884061bd2f095631a115c70d33d13fb1e6fb6;p=lttng-tools.git 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);