Port: Link live lib with ctf to satisfy cygwin linker
[babeltrace.git] / formats / ctf / ctf.c
index c5d654c975f60a7ad74d3574eec377468ad185ce..324b9f8e10b5059af7220421b107e70feca9718c 100644 (file)
@@ -779,8 +779,6 @@ int ctf_init_pos(struct ctf_stream_pos *pos, struct bt_trace_descriptor *trace,
                pos->parent.rw_table = write_dispatch_table;
                pos->parent.event_cb = ctf_write_event;
                pos->parent.trace = trace;
-               if (fd >= 0)
-                       ctf_packet_seek(&pos->parent, 0, SEEK_SET);     /* position for write */
                break;
        default:
                assert(0);
@@ -2431,8 +2429,10 @@ struct bt_trace_descriptor *ctf_open_trace(const char *path, int flags,
 
        return &td->parent;
 error:
-       trace_debug_info_destroy(td);
-       g_free(td);
+       if (td) {
+               trace_debug_info_destroy(td);
+               g_free(td);
+       }
        return NULL;
 }
 
This page took 0.028342 seconds and 4 git commands to generate.