Move `src/plugins/comp-logging.h` -> `src/logging/comp-logging.h`
[babeltrace.git] / src / plugins / ctf / lttng-live / data-stream.c
index d759e3635da8b23a94aab8b6daf04d01f768c23b..1c89a87ae1a524c5baebb0a6b45b1b3a51a61764 100644 (file)
@@ -26,7 +26,7 @@
 #define BT_COMP_LOG_SELF_COMP self_comp
 #define BT_LOG_OUTPUT_LEVEL log_level
 #define BT_LOG_TAG "PLUGIN/SRC.CTF.LTTNG-LIVE/DS"
-#include "plugins/comp-logging.h"
+#include "logging/comp-logging.h"
 
 #include <stdio.h>
 #include <stdint.h>
@@ -111,11 +111,14 @@ bt_stream *medop_borrow_stream(bt_stream_class *stream_class,
                                "%" PRId64 ", stream ID %" PRIu64 ")",
                                lttng_live_stream->name->str,
                                stream_class_id, stream_id);
+                       goto end;
                }
+
                bt_stream_set_name(lttng_live_stream->stream,
                        lttng_live_stream->name->str);
        }
 
+end:
        return lttng_live_stream->stream;
 }
 
@@ -264,9 +267,7 @@ void lttng_live_stream_iterator_destroy(
        if (stream_iter->msg_iter) {
                bt_msg_iter_destroy(stream_iter->msg_iter);
        }
-       if (stream_iter->buf) {
-               g_free(stream_iter->buf);
-       }
+       g_free(stream_iter->buf);
        if (stream_iter->name) {
                g_string_free(stream_iter->name, TRUE);
        }
This page took 0.03425 seconds and 4 git commands to generate.