Coverity report:
CID
1404943 (#1 of 1): Dereference after null check (FORWARD_NULL)9.
var_deref_model: Passing null pointer session->chunk_being_archived to
lttng_trace_chunk_get_id, which dereferences it.
Reported-by: Coverity (1404943) Dereference after null check
Signed-off-by: Francis Deslauriers <francis.deslauriers@efficios.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
*/
ret = timer_session_rotation_pending_check_stop(session);
if (ret) {
- goto end;
+ goto check_ongoing_rotation;
}
check_session_rotation_pending_on_consumers(session,
&rotation_completed);
if (!rotation_completed ||
session->rotation_state == LTTNG_ROTATION_STATE_ERROR) {
- goto end;
+ goto check_ongoing_rotation;
}
/*
}
ret = 0;
-end:
+check_ongoing_rotation:
if (session->rotation_state == LTTNG_ROTATION_STATE_ONGOING) {
uint64_t chunk_being_archived_id;
}
}
+end:
return ret;
}