Signed-off-by: Philippe Proulx <eeppeliteloop@gmail.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
bt_object_set_parent(event, stream);
ret = bt_ctf_event_populate_event_header(event);
if (ret) {
bt_object_set_parent(event, stream);
ret = bt_ctf_event_populate_event_header(event);
if (ret) {
}
/* Make sure the various scopes of the event are set */
ret = bt_ctf_event_validate(event);
if (ret) {
}
/* Make sure the various scopes of the event are set */
ret = bt_ctf_event_validate(event);
if (ret) {
}
/* Save the new event and freeze it */
}
/* Save the new event and freeze it */
* longer needed.
*/
bt_put(event->event_class);
* longer needed.
*/
bt_put(event->event_class);
- if (ret) {
- /*
- * Orphan the event; we were not succesful in associating it to
- * a stream.
- */
- bt_object_set_parent(event, NULL);
- }
+ return ret;
+
+error:
+ /*
+ * Orphan the event; we were not successful in associating it to
+ * a stream.
+ */
+ bt_object_set_parent(event, NULL);
+