sink.ctf.fs: initialize structure fields
[babeltrace.git] / src / plugins / ctf / fs-sink / fs-sink-stream.cpp
index 6611744b5b9c1acec87b6140fcaa0a55e81a5681..9ab71b257aecd2c51d6a3845ba61482cc67a09c2 100644 (file)
@@ -38,7 +38,7 @@ void fs_sink_stream_destroy(struct fs_sink_stream *stream)
     }
 
     bt_packet_put_ref(stream->packet_state.packet);
-    g_free(stream);
+    delete stream;
 
 end:
     return;
@@ -124,14 +124,10 @@ static void set_stream_file_name(struct fs_sink_stream *stream)
 struct fs_sink_stream *fs_sink_stream_create(struct fs_sink_trace *trace,
                                              const bt_stream *ir_stream)
 {
-    struct fs_sink_stream *stream = g_new0(struct fs_sink_stream, 1);
+    fs_sink_stream *stream = new fs_sink_stream;
     int ret;
     GString *path = g_string_new(trace->path->str);
 
-    if (!stream) {
-        goto end;
-    }
-
     stream->log_level = trace->log_level;
     stream->trace = trace;
     stream->ir_stream = ir_stream;
This page took 0.023153 seconds and 4 git commands to generate.