Fix: sessiond: null pointer dereference on initial evaluation of session
authorJérémie Galarneau <jeremie.galarneau@efficios.com>
Fri, 8 Jul 2022 15:45:01 +0000 (11:45 -0400)
committerJérémie Galarneau <jeremie.galarneau@efficios.com>
Fri, 8 Jul 2022 15:45:01 +0000 (11:45 -0400)
commitd5ea894457d77598d1bb51ff1d4ba6f1d66fcc3c
treee397d8ba4021d36244e0831648b4b646cccc5a5c
parent609996d5eafa3c5fb62924f4acb3813b00264e18
Fix: sessiond: null pointer dereference on initial evaluation of session

Coverity reports:
1490492 Dereference after null check
Either the check against null is unnecessary, or there may be a null
pointer dereference.

In evaluate_session_condition(lttng_condition const *, session_info const *, session_state_sample const *, lttng_evaluation **): Pointer is checked against null but then dereferenced anyway (CWE-476)

This function is used to evaluate the initial state of a session and its
transitions against a given condition.

In the case of an initial evaluation, the wrong state sample is used
which results in a null dereference.

Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
Change-Id: Ia465e26d2bf0dae725504915fa62332ecf8c7784
src/bin/lttng-sessiond/notification-thread-events.cpp
This page took 0.025863 seconds and 4 git commands to generate.