A sequence's "elements" array might be NULL if
bt_ctf_field_sequence_set_length() was never called during its lifetime.
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
}
sequence = container_of(field, struct bt_ctf_field_sequence, parent);
}
sequence = container_of(field, struct bt_ctf_field_sequence, parent);
- g_ptr_array_free(sequence->elements, TRUE);
+ if (sequence->elements) {
+ g_ptr_array_free(sequence->elements, TRUE);
+ }
bt_ctf_field_put(sequence->length);
g_free(sequence);
}
bt_ctf_field_put(sequence->length);
g_free(sequence);
}