struct bt_ctf_field *packet_context = NULL, *writer_packet_context = NULL;
struct bt_ctf_field_type *struct_type = NULL, *writer_packet_context_type = NULL;
struct bt_ctf_stream_class *writer_stream_class = NULL;
- struct bt_ctf_field *field;
+ struct bt_ctf_field *field = NULL;
struct bt_ctf_field_type *field_type;
int nr_fields, i;